Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

docmd setwarnings

Status
Not open for further replies.

AFKAFB

Programmer
Aug 22, 2005
26
US
Hi
My access database seens to have the Set Warnings command turned off.
Whenever i run queries it does not show the error command.
All my macros use the set warnings command to no and yes at the end of
the macro but for some reason its turned off.
Any ideas
AFKAFB


 
What about the 3 confirm checkboxes in the Edit/Search tab of the menu Tools -> Options ... window ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
All three boxes ticked
i've also a piece of code that normally fixes it but not workngi now.
code below:
Public Function setWarningsOn() As Boolean

On Error GoTo ERR_HANDLER

DoCmd.SetWarnings -1

NORMAL_EXIT:

setWarningsOn = True
Exit Function

ERR_HANDLER:

MsgBox Err.Number & ", " & Err.Description
setWarningsOn = False
Exit Function

End Function
 
ERR_HANDLER:

MsgBox Err.Number & ", " & Err.Description
setWarningsOn = False
Exit Function

you need the docmd?

Also, I'd make sure any error function turned warnings ON just before exiting, becuase they will stay off until the next setwarningson TRUE is run.
 
hi
i'm unclear with your answer

1. where would i put the docmd
2. can you expalin more about turning warnings on at every error function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top