Don't want it to save a record......

lipin

Registered User.
Local time
Today, 16:01
Joined
May 21, 2002
Messages
149
I have a form that has a subform on it. On the main form there are two buttons. One that makes the subform visible and shifts focus to the subform for additional data entry. Well it seems as though the users, who aren't computer literate at all, click the subform button and then realize they hit it by mistake.

Well this is a problem because in order to make sure the form is completely filled out I made the fields on the subform required. But to get around the problem of the users hitting the subform on accident I made all the fields default to 0. Well this puts these "empty records" into the tables.

Is there a way to say if a field or combination of fields is 0 or blank then don't save the record? Maybe tie this to the click event of the Next Record button on the main form?

So far these "empty records" are showing up in my reports and messing up things like counts and such. I could alter queries to not pick up if a field is 0, but I would rather not have the records there in the first place.

Thanks a lot.
 
In the forms Before Update event click F1 to get help on how to use this event and cancel the update if fields are missing data, etc....

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom