I'm trying to add an unbound combobox to locate records on my form. I am trying to use the DoCmd.Searchforrecord but I can't seem to figure out the correct syntax to use for a search on two fields. I have two primary keys, CaseNo and FIPS, since a case number can have multiple FIPS assigned to it and a FIPS can be assigned to multiple cases I need the two working together to define a unique record.
I can get the following code to work to find the case number but can’t figure out how to add the 2nd condition to match the FIPS. (this is in the afterupdate of the combobox)
DoCmd.SearchForRecord acActiveDataObject, , acFirst, "[CaseNo] = " & "'" & [Screen].[ActiveControl] & "'"
Can anyone tell me what I need to add and where? Or if you have a better suggestion to accomplish this.
Thanks in advance.
I can get the following code to work to find the case number but can’t figure out how to add the 2nd condition to match the FIPS. (this is in the afterupdate of the combobox)
DoCmd.SearchForRecord acActiveDataObject, , acFirst, "[CaseNo] = " & "'" & [Screen].[ActiveControl] & "'"
Can anyone tell me what I need to add and where? Or if you have a better suggestion to accomplish this.
Thanks in advance.