
Thank you. I am having trouble with the row source property it is giving me an error
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello all,
I am having trouble making my search box work with all the fields. The PPNumYr field was originally a string and the numbers had leading zeros such 0197, 0297 and then I changed it to Numbers so the leading zero is now gone but there are numbers with zeros in the middle. I have posted my code below and I realize since I changed the field to numbers InStr does not work anymore but it did not work when the numbers were still a string. How can I fix this? Another field that I want to be searched is names of locations and I am not sure how to do that either, which is the second part of the code. Please help
If InStr(SearchText, "###") <> 0 Then
DoCmd.OpenForm "PhotopointF", , , "PPNumYr=""" & SearchText & """"
Exit Sub
End If
If InStr(SearchText, "Out House", "East caves", "Bottom Hill") <> 0 Then
DoCmd.OpenForm "PhotopointF", , , "LocationName=""" & SearchText & """"
Exit Sub
End If
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Thank you. I am having trouble with the row source property it is giving me an error
If you get an error message please provide the EXACT error message.
it might also help us help you if we know more about the application and the data structure.