G
Greg
On my main form (Customers) - Table (Customers) -- Primar Key (CustomerID) I
have a few command buttons. One of them is Create new customer
("DoCmd.GoToRecord , , acNewRec") and another one is exit command:
Dim smsg As String
smsg = "Do you want to exit?"
If MsgBox(smsg, vbQuestion + vbYesNo, "Exit Remedy?") = vbYes Then
DoCmd.Quit
Everything is working ok however if I select Create New Customer button and
change my mind I am not able to close this form because error message: Index
or primary key cannot contain a Null value
I can add Validation text and instruct user to close main window, but it
does not seems to me like a right way to do it. Is there is a better way to
close main form in case I change my mind and don't want to add new customer?
Thanks
have a few command buttons. One of them is Create new customer
("DoCmd.GoToRecord , , acNewRec") and another one is exit command:
Dim smsg As String
smsg = "Do you want to exit?"
If MsgBox(smsg, vbQuestion + vbYesNo, "Exit Remedy?") = vbYes Then
DoCmd.Quit
Everything is working ok however if I select Create New Customer button and
change my mind I am not able to close this form because error message: Index
or primary key cannot contain a Null value
I can add Validation text and instruct user to close main window, but it
does not seems to me like a right way to do it. Is there is a better way to
close main form in case I change my mind and don't want to add new customer?
Thanks