Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

Urgent (ish) enquiry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scubadiver - 20 Jun 2007 08:56 GMT
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
Scott McDaniel - 20 Jun 2007 10:57 GMT
>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
[quoted text clipped - 6 lines]
>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
scubadiver - 20 Jun 2007 11:10 GMT
The "new query" button is simply to add a new record. I only want add a new
record without the last record being cleared.

> >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
[quoted text clipped - 18 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
Scott McDaniel - 20 Jun 2007 13:30 GMT
>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.

>> >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
[quoted text clipped - 18 lines]
>> scott@takemeout_infotrakker.com
>> www.infotrakker.com

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
scubadiver - 20 Jun 2007 13:57 GMT
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.

> >The "new query" button is simply to add a new record. I only want add a new
> >record without the last record being cleared.
[quoted text clipped - 34 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
Rick Brandt - 20 Jun 2007 14:26 GMT
> 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?

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

scubadiver - 20 Jun 2007 14:17 GMT
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!

> >The "new query" button is simply to add a new record. I only want add a new
> >record without the last record being cleared.
[quoted text clipped - 34 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.