G
Guest
I have a search form on which the user enters search criteria, clicks a
search button and the matching records are displayed on a subform. I used
the following code to navigate from the subform to the appropriate record (on
a separate form) and get a run time error 2501 when double-clicking on a text
field - the same code works if I use it on a numeric field. Is there anyway
to use it on a text field? It seems Access can't identify a match if it's a
text field even though the data is an exact match. (in the case below, it is
an exact 9 character match, no leading or trailing spaces)
Private Sub TIN_DblClick(Cancel As Integer)
DoCmd.OpenForm "frm_Vendor", _
whereCondition:="TIN =" & Me!TIN
End Sub
Any ideas? Thanks!
search button and the matching records are displayed on a subform. I used
the following code to navigate from the subform to the appropriate record (on
a separate form) and get a run time error 2501 when double-clicking on a text
field - the same code works if I use it on a numeric field. Is there anyway
to use it on a text field? It seems Access can't identify a match if it's a
text field even though the data is an exact match. (in the case below, it is
an exact 9 character match, no leading or trailing spaces)
Private Sub TIN_DblClick(Cancel As Integer)
DoCmd.OpenForm "frm_Vendor", _
whereCondition:="TIN =" & Me!TIN
End Sub
Any ideas? Thanks!