I have been struggling at work with a DLookup using multiple criteria. I would like a text box to display the results of a DLookup based on the values selected in three comboboxes and the table that runs them all. Here is my code:
Expand|Select|Wrap|Line Numbers
- Private Sub Subverbs_GotFocus()
- 'When the Subverbs gets focus it looks up proper subverbs from Authority_Lookup table
- Me.Subverbs = DLookup("[Subverbs]", "AUTHORITY_LOOKUP", "[Sub_Line]= '" & "Me.Employee_LOB.Value &" And "AUTHORITY_LOOKUP", "[Band_name]= '" & "& Me.Change_Title.Value &" And "AUTHORITY_LOOKUP", "[InsideOutside]= '" & "& Me.Clm_Rep_Type.Value &" "'")
- End Sub
The table is AUTHORITY_LOOKUP and the fields are sub_line, band_name, InsideOutside, and I wand me.subverbs to display the Subverbs field result based on the value in the comboboxes.
I would love any help! This is my first post and this looks like a great community.
Thank you so much!