Mousetrap Save and New questions

kilobyte

Registered User.
Local time
Today, 05:12
Joined
Oct 5, 2005
Messages
52
Could someone please explain to me the way forms save information?

I always understood that database tables automatically save information as you enter it. But the command button wizard and also the Better Mousetrap example use special save buttons so it seems different.

I would like to know because I am working on my forms and I need to validate entered data so there aren't any messed up records. Could I use a save button to ensure that the data entered matches certain criteria? I.E. No null fields, no saving multiple records about the same subject (like multiple bios on the same employee or multiple goals for the same team and so forth.)

Just a little Access 101 if anyone has the time would be very appreciated. I am going for understanding here.

Thanks.
 
You could use an event procedure in the form's before_update event and let the user go through data validation (ex: You didn't enter a postal code, save anyway?) to check all your rules before allowing the record to be saved.

ShanVel
 
Without additional code Access *will* save changed records when:
1) You try and move off of the record.
2) You move focus from a main form to a SubForm or back.
3) You try and close the form.

I think those are the main spots but there may be others.
 
Thanks for the answer guys.

When does the before update event occur?

EDIT: Nevermind that. I looked up the answer in the help file. (Duh.)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom