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 / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

save automatically on form close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 12 Jul 2005 19:22 GMT
Hi all,
  Is there a way to save the form from run mode when the form is closed
(hide the prompt asking yes, no, cancel).

Thx
Klatuu - 12 Jul 2005 20:16 GMT
copied from Access Help:
DoCmd.Close acForm, "Order Review", acSaveYes

> Hi all,
>    Is there a way to save the form from run mode when the form is closed
> (hide the prompt asking yes, no, cancel).
>
> Thx
Jeff - 12 Jul 2005 20:48 GMT
thx but under which event? form unload?

> copied from Access Help:
> DoCmd.Close acForm, "Order Review", acSaveYes
[quoted text clipped - 4 lines]
> >
> > Thx
Klatuu - 12 Jul 2005 20:51 GMT
How do you close it now?

> thx but under which event? form unload?
>
[quoted text clipped - 6 lines]
> > >
> > > Thx
Jeff - 12 Jul 2005 20:55 GMT
either use ctrl+w or click the close button on the upper right corner of the
form.  thx

> How do you close it now?
>
[quoted text clipped - 8 lines]
> > > >
> > > > Thx
Klatuu - 12 Jul 2005 21:04 GMT
Can't do it from there.  Normally, you would have a close button on the form
and the code would go there.  If you don't want to see the message then in
the Open event of the form:
docmd.SetWarnings False

> either use ctrl+w or click the close button on the upper right corner of the
> form.  thx
[quoted text clipped - 11 lines]
> > > > >
> > > > > Thx
Jeff - 12 Jul 2005 21:08 GMT
but if i choose not to display the warning, will it default to yes, or no?
also, by setting warning to false, it'll turn off every warning.  I m only
interested in saving the design automatically without prompting the user.

> Can't do it from there.  Normally, you would have a close button on the form
> and the code would go there.  If you don't want to see the message then in
[quoted text clipped - 16 lines]
> > > > > >
> > > > > > Thx
Rick Brandt - 12 Jul 2005 21:28 GMT
> but if i choose not to display the warning, will it default to yes,
> or no? also, by setting warning to false, it'll turn off every
> warning.  I m only interested in saving the design automatically
> without prompting the user.

Why would a user be making design changes to the form in the first place?
Are you just talking about filters and such?

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

Klatuu - 12 Jul 2005 21:14 GMT
Therein lies the problem.  Setting Warnings off will supress all warnings,
and act as if you answered yes to every occurance.
There are two problems I have with your design:
1. I never put the close icon on a form so it has to be closed via my
command button.
2. I never allow changes to a form by a user.  You don't know what state it
will be in when you open it the next time.
But, these are subjective opinions not to be confused with the "correct" way.

> Can't do it from there.  Normally, you would have a close button on the form
> and the code would go there.  If you don't want to see the message then in
[quoted text clipped - 16 lines]
> > > > > >
> > > > > > Thx
Pete Merenda - 18 Jul 2005 20:09 GMT
I entered a question a couple of hours ago under 'General' entitled 'Error
encountered while saving.'  Despite seeing the msg when saving new records,
my data saves to tables correctly.

So, even though I see it's not recommended, I've chosen to use this tip to
hide warnings, however it's not running. I'm using:
DoCmd.SetWarnings = False

on the form's Open event, however, I'm getting a compile error "argument not
optional" highlighting the "SetWarnings" phrase.

Can you offer suggestions on syntax please?

> Can't do it from there.  Normally, you would have a close button on the form
> and the code would go there.  If you don't want to see the message then in
[quoted text clipped - 16 lines]
> > > > > >
> > > > > > Thx
Van T. Dinh - 13 Jul 2005 08:46 GMT
Be carefully here: Do you want to save the data currently displayed on the
Form or the *design* of the Form?

Signature

HTH
Van T. Dinh
MVP (Access)

> Hi all,
>   Is there a way to save the form from run mode when the form is closed
> (hide the prompt asking yes, no, cancel).
>
> Thx
 
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.