P
Paul B.
Can someone tell me why this does not work....
------------------------------------------------------
Private Sub FindUnit_Click( )
On Error GoTo Err_FindUnit_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmUnitsByStation"
stLinkCriteria = "[AssignedTo] Like Me.StationNumber & "*""
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_FindUnit_Click:
Exit Sub
Err_FindUnit_Click:
Call MsgBox ("You must enter a station number or select one from the drop_
down list." & vbCrLf & "", vbOkOnly + vbExclamation + vbSystemModal + _
vbDefaultButton1, "Error....Please try again")
Resume Exit_FindUnit_Click
End Sub
------------------------------------------------------------------------------------------
I have a list box that the user can either select a station number ie: 202
from a value list, or enter the station number directly.
Everytime I select or enter a station number, I get the error message box.
Thanks in advance....
------------------------------------------------------
Private Sub FindUnit_Click( )
On Error GoTo Err_FindUnit_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmUnitsByStation"
stLinkCriteria = "[AssignedTo] Like Me.StationNumber & "*""
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_FindUnit_Click:
Exit Sub
Err_FindUnit_Click:
Call MsgBox ("You must enter a station number or select one from the drop_
down list." & vbCrLf & "", vbOkOnly + vbExclamation + vbSystemModal + _
vbDefaultButton1, "Error....Please try again")
Resume Exit_FindUnit_Click
End Sub
------------------------------------------------------------------------------------------
I have a list box that the user can either select a station number ie: 202
from a value list, or enter the station number directly.
Everytime I select or enter a station number, I get the error message box.
Thanks in advance....