Urgent (ish) enquiry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform which has some required fields. I have been informed that a
way to get out of the subform when a record has been partially created is to
use

me.undo

in the before update event of the form.

When I complete a record and click on the "new query" button the record is
still cleared which is obviously not what I want.

Is the simplest solution simply to set all the field "required" properties
to "no"? Or is there a way around it?

thanks
 
I have a subform which has some required fields. I have been informed that a
way to get out of the subform when a record has been partially created is to
use

me.undo

in the before update event of the form.

When I complete a record and click on the "new query" button the record is
still cleared which is obviously not what I want.

What do you want to accomplish, and what does the "new query" button have to do with saving your records? Are they
related in some way? Is the "new query" button one that you've built, or are you referring to the one Access shows?
Is the simplest solution simply to set all the field "required" properties
to "no"? Or is there a way around it?


thanks

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
The "new query" button is simply to add a new record. I only want add a new
record without the last record being cleared.
 
The "new query" button is simply to add a new record. I only want add a new
record without the last record being cleared.

By "cleared", do you mean that the record isn't saved? Or that the record IS saved, but the data you've entered is
cleared when you add a new record.

If the first, then there's a problem with your code; for eg, if you're issuing a Me.Undo before saving, this would
invalidate the record and NOT save your data.

If you're trying to carry data over from one record to the next, then you'd need to store the current data somewhere
(perhaps Form level variables) and then use that stored data to auto-fill the new record.


Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Sorry if I haven't been clear enough.

If a record has been started and then not wanted I want it to be cleared
(remember there are required fields). Or if all the fields are entered I do
want the record to be saved.
 
I think I've sorted it out. I put me.undo in a second command button instead
of the form's before update event.

Sorry!
 
scubadiver said:
Sorry if I haven't been clear enough.

If a record has been started and then not wanted I want it to be
cleared (remember there are required fields). Or if all the fields
are entered I do want the record to be saved.

If the user does not fill out required fields then the record will not be
saved (sort of the point of required fields). Have you set these fields as
required in your table's design?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top