Combo Box Record Selector AfterUpdate Macro Help

jbailey4545

New member
Local time
Yesterday, 22:46
Joined
Jun 1, 2012
Messages
5
I have a form that has a Combo box record selector which works fine. I need to add more to the Where condition of this macro.

Combo1 - Options 1-Facility, 2-Physician (referral_type)

Combo2 - Record selector that works, either shows a list of facilities or list of physicians.
Macro SearchForRecord - Where Condition ="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0))


would like it to be
="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0)) AND [referral_type] = Me!Combo2

Have tried a few different things with no luck.
 
I'm not a macro guy but try

="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0)) & " AND [referral_type] = " & Me!Combo2
 
Thanks for the help but that didn't work. Recieved error number 2950 with the Arguments:
-1, , First, ="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0)) & " AND [referral_type] = " & [Me]![Combo2]
 
Sorry, Me would only be valid in VBA. Try with the full form reference:

="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0)) & " AND [referral_type] = " & Forms!FormName.Combo2
 
Happy to help and welcome to the site by the way!
 

Users who are viewing this thread

Back
Top Bottom