Re: Best way to cancel out of a data entry form?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You can turn the warning off with:

Docmd.setwarnings off

Be sure to turn it back on, though - the setting is for the whole application, and having warnings off might disable messages you DO want the users to see.

The help on SetWarnings gives a good explanation.

John


Mick wrote:

I want to put a 'cancel' button in a data entry form so that if a user
enters some data and then cancels it discards the data entered, if I do
a delete record:

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

It seems to work but prompts the user 'do you want to delete 1 record'
which scares them a little. Is there a way to modify this or use
another function to get it to cancel and discard without the prompt or
to change the prompt to 'are you sure you want to cancel'?

Thanks for any input!

Mick


.



Relevant Pages

  • Re: Stopping Page Unload
    ... "warning" code to prompt them? ... Try onunload and set the return to false if the user selects cancel. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Best way to cancel out of a data entry form?
    ... I want to put a 'cancel' button in a data entry form so that if a user ... enters some data and then cancels it discards the data entered, ... DoCmd.DoMenuItem acFormBar, acEditMenu, 8,, acMenuVer70 ... to change the prompt to 'are you sure you want to cancel'? ...
    (microsoft.public.access.forms)
  • Re: compacted folders - messages lost
    ... >> As per my experience, if you close OE and get the prompt, if you choose ... >> Cancel, you will still get the prompt every time you close OE, but it ... > system has started compacting when I closed OE6 with no warning or ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Cancel button works when logging in without password
    ... Mark asks a question to do with PCs, Super_Geek dives in and tries to ... Or you can cancel the prompt all together: ... Create a screensaver with a password setting ...
    (microsoft.public.security)
  • Re: Booking duplicates
    ... Cancel = True ... Tips for Access users - http://allenbrowne.com/tips.html ... equipment, that he books for certain days and times. ... I would like go to the conflicting order when the prompt is answered. ...
    (microsoft.public.access.modulesdaovba)