G
Gil D.
Hello,
I have a combobox NotInList Sub:
Private Sub VehicleNumber_NotInList(NewData As String, Response As
Integer)
Dim intResponse As Integer
Dim vehicleNumber As String
vehicleNumber = NewData
DoCmd.OpenForm "AddVehicle", , , , , acDialog, vehicleNumber
Response = acDataErrAdded
End sub
My sub opens a pop up form named AddVehicle. In this form I have 2
commands button. First button adds the data to a table and the second
is cancel button.
My sub handles the first button click (add data).
How can I know which button was clicked when I'm back to
VehicleNumber_NotInList sub so I can handle cancel button click (undo
typing and avoid error message) ?
Thank you
Gil D.
I have a combobox NotInList Sub:
Private Sub VehicleNumber_NotInList(NewData As String, Response As
Integer)
Dim intResponse As Integer
Dim vehicleNumber As String
vehicleNumber = NewData
DoCmd.OpenForm "AddVehicle", , , , , acDialog, vehicleNumber
Response = acDataErrAdded
End sub
My sub opens a pop up form named AddVehicle. In this form I have 2
commands button. First button adds the data to a table and the second
is cancel button.
My sub handles the first button click (add data).
How can I know which button was clicked when I'm back to
VehicleNumber_NotInList sub so I can handle cancel button click (undo
typing and avoid error message) ?
Thank you
Gil D.