A button to delete a newly created record?

Tezcatlipoca

Registered User.
Local time
Today, 15:52
Joined
Mar 13, 2003
Messages
246
Hokay, firstly my apologies if this is the wrong subforum, but since my question revolves around the behaviour of one of my forms I guessed the thread should go here.

I have a very simple little database which I use to log RMAs (Returned Merchandise Authorizations). The database consists of three forms:

Form A - The switchboard. The main menu, works fine.
Form B - The View/Edit window. Allows me to look at the records in the database and alter them if necessary, works fine.
Form C - The Add window. Has the same form layout as B, but allows for adding records only. This is the one causing problems.

Now the situation is that when I enter Form C, the box for the RMA number gets autofilled out - which is correct - thus creating a new record. However, what I want to achieve is a button on the form that will allow me to quit back to the main menu without saving the record that has been created by opening the form. This is for situations where the form has been accidentally opened, or where a form has been started, but is not required to be finished.
 
This can be achieved by setting some of the fields in your table as required, if a user does not complete all the fields you have marked as required then Access won't save the record. A message box will appear giving them the option to exit the record without saving or go back and complete the fields.
 
Ah-ha, thanks Michael; I knew there was a way of doing it. Have also just found GHudson's wonderful mousetrap example, so am considering using that to force the user to either save the form, or undo their additions.
 

Users who are viewing this thread

Back
Top Bottom