S
Steve D
Borrowed this code out of Alison Balter's book ...
Private Sub countryID_NotInList(NewData As String, Response As Integer)
Dim intReply As Integer
intReply = MsgBox("The country you entered is not in the list. Would
you like to add a new country? ", vbYesNo)
If intReply = vbYes Then
DoCmd.OpenForm "frmAddCountry", , , , acFormAdd, acDialog, NewData
'-- Record added, so cancel Access' default processing
Response = acDataErrAdded
Else
MsgBox "Please select a country from the list."
Response = acDataErrContinue
End If
End Sub
It works fine but I would like to have the info that is 'not in the list' on
the frmTabbed be passed to the 'frmAddVendor' when the above code kicks in.
This is what i have on the OnOpen event
rivate Sub Form_Open(Cancel As Integer)
Dim strNewVendor As String
strNewVendor = Me.OpenArgs
If Nz(Len(Me.OpenArgs), 0) > 0 Then
DoCmd.GoToRecord , , acNewRec
Me.vendor = strNewVendor
End If
End Sub
It's not working and i have virtually no clue as to how to make this work.
H_E_L_P please!
Private Sub countryID_NotInList(NewData As String, Response As Integer)
Dim intReply As Integer
intReply = MsgBox("The country you entered is not in the list. Would
you like to add a new country? ", vbYesNo)
If intReply = vbYes Then
DoCmd.OpenForm "frmAddCountry", , , , acFormAdd, acDialog, NewData
'-- Record added, so cancel Access' default processing
Response = acDataErrAdded
Else
MsgBox "Please select a country from the list."
Response = acDataErrContinue
End If
End Sub
It works fine but I would like to have the info that is 'not in the list' on
the frmTabbed be passed to the 'frmAddVendor' when the above code kicks in.
This is what i have on the OnOpen event
rivate Sub Form_Open(Cancel As Integer)
Dim strNewVendor As String
strNewVendor = Me.OpenArgs
If Nz(Len(Me.OpenArgs), 0) > 0 Then
DoCmd.GoToRecord , , acNewRec
Me.vendor = strNewVendor
End If
End Sub
It's not working and i have virtually no clue as to how to make this work.
H_E_L_P please!