N
Nick.Korynski
I am trying to use the openforms command to open a form on a certain
record based on user input from a text box. The user enters a value
that is in this format: xx-xxxx where x is any integer or letter. For
some reason, when I put this into the where condition in the openforms
command, when executed, it is not finding the record properly. Does
this have something to do with the - or should it work properly with
the dash? Here is my code:
Option Compare Database
Public InputTailNumber As String
Private Sub Command2_Click()
DoCmd.OpenForm "Images", , , "TailNumber ='" & InputTailNumber &
"'"
End Sub
Public Sub SearchByTailNumber_Change()
InputTailNumber = Me.SearchByTailNumber.Text
End Sub
Thanks,
Nick
record based on user input from a text box. The user enters a value
that is in this format: xx-xxxx where x is any integer or letter. For
some reason, when I put this into the where condition in the openforms
command, when executed, it is not finding the record properly. Does
this have something to do with the - or should it work properly with
the dash? Here is my code:
Option Compare Database
Public InputTailNumber As String
Private Sub Command2_Click()
DoCmd.OpenForm "Images", , , "TailNumber ='" & InputTailNumber &
"'"
End Sub
Public Sub SearchByTailNumber_Change()
InputTailNumber = Me.SearchByTailNumber.Text
End Sub
Thanks,
Nick