Cancel new record

chellebell1689

Registered User.
Local time
Today, 11:02
Joined
Mar 23, 2015
Messages
267
Hello,
I need help canceling a new record. I have a form to add a new member and I'm currently getting help to determine if the new member being added is a duplicate or not. I have a cancel button and I want to be able to hit the cancel button and the form is wiped clean and then directed to the first record. I tried using a macro for the click event of the cancel button. The macro told it, if form.dirty delete record then go to first record. But for me to add a new member and them to be saved in the db, they have to have a class assigned to them. Because of this requirement, I can't delete the record, I get an error telling me it can't find the class. I even tried using cancel = true in the form's before update event. But it still gives me the same error. (For the before update event I had if cancelbuttonpressed = true then cancel = true. In the click event for the button, I had cancelbuttonpressed = true)

I think I gave all the information, but my brain is also working on 10 other things for this db, so I may have missed something. Let me know if you need more info. Thanks in advance for all the help.
 
in the form BEFORE UPATE event
you can set CANCEL = TRUE , to stop the add.
 
Ok, so I don't know VBA and I tried just putting that in, but it won't let me save. I tried telling it if I click the cancel button, then to make Cancel = True, but that didn't work either (just told CancelButtonPressed = True is not supported).
 

Users who are viewing this thread

Back
Top Bottom