Hi.
You can create a function that returns a value, or you can use an IF block
to conditionally assign the value to a variable or a control, such as a text
box. For example, here's an IF block that assigns the value from the
#PATIENTS text box to myVariable:
If ((STATUS = "Active") AND (GENDER = "F") AND (VENDOR = "abc")) Then
myVariable = Me![#PATIENTS].Value
End If
If the value you want needs to be calculated (as in "how many patients")
instead of copied from a text box, then of course you'll have to code for
that. If this is the part you need help with, then you need to give us more
information. For example, are you trying to determine how many patients
listed in the table meet the above criteria? Or are you trying to determine
how many patients listed in the table meet the above criteria this month?
Or something else?
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.