Selasa, 29 Juli 2014

[MS_AccessPros] Re: Calculating text fields base on dropdown box

 

Art


Just add another criteria to each DLookup. Not sure what the name of your date field is so I'll call it myDate.
=DCount("[ApplicationID]","tblApplication","[ApplicantStatusType]='Active' AND Month(myDate)=" & cboMonth & "AND Year(myDate)=" & cboYear)

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <dbalorenzini@yahoo.com> wrote :

I have 3 textboxes that I would like to have calculated based on the selection in two drop down list. The first list would be cboYear that contains a list of years and then cboMonth which contain a list of months. The 3 text boxes are called txtTotalActive, txtTotalInactive, txtTotalClosed. The expression that supports the text boxes are as follows:


txtTotalActive = =DCount("[ApplicationID]","tblApplication","[ApplicantStatusType]='Active'")

txtTotalInactive = =DCount("[ApplicationID]","tblApplication","[ApplicantStatusType]='Inactive'")

txtTotalActive = =DCount("[ApplicationID]","tblApplication","[ApplicantStatusType]='Closed'")


I need to know how to adjust the expression to take the input in from the Month and Year dropdowns. Any ides would be greatly appreciated.


Thank you,


Art Lorenzini

Sioux Falls, SD


 

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar