N
Nylex
If they try to enter a record without a selection in the parent form I need
to return them to the main form - I have tried different ways but none work -
this is my current try
Private Sub ModelName_Enter()
Dim StrName As String
Dim i As Integer
Dim Msg As String
StrName = Nz(Me.Parent![VehName])
If StrName = "" Then GoTo 100
GoTo 200
100
Msg = "'" & "' No Vehicle Name is Selected."
Msg = Msg & " - Select Vehicle Name"
i = MsgBox(Msg, vbQuestion + vbYesonly, "Unknown Vehicle...")
Response = acDataErrContinue
Forms!vehicle!VehName.SetFocus
200 Exit Sub
End Sub
When it returns it goes to the field ON THE SUBFORM that it started in - not
the parent form
to return them to the main form - I have tried different ways but none work -
this is my current try
Private Sub ModelName_Enter()
Dim StrName As String
Dim i As Integer
Dim Msg As String
StrName = Nz(Me.Parent![VehName])
If StrName = "" Then GoTo 100
GoTo 200
100
Msg = "'" & "' No Vehicle Name is Selected."
Msg = Msg & " - Select Vehicle Name"
i = MsgBox(Msg, vbQuestion + vbYesonly, "Unknown Vehicle...")
Response = acDataErrContinue
Forms!vehicle!VehName.SetFocus
200 Exit Sub
End Sub
When it returns it goes to the field ON THE SUBFORM that it started in - not
the parent form