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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog Box Prob!!

Status
Not open for further replies.

TidyTrax

Programmer
Jul 11, 2001
263
AU
I have a piece of code running within a loop which basically reads information into a number of variables in VBA and then using the doCmd.RunSql command inserts them into the database.

The problem i am having is, that everytime i use this doCmd.RunSql "INSERT........" i get a dialog box that pops up telling me that i am about to append a row of a table, and do i wish to continue YES/NO. What i want to do is skip this, is this possible?? As i dont want my users to have the option to say No, and there are approx 1000 adds to the database at one time, which is a lot of clicking YES!! Anyone????
 
Use DoCmd.Setwarnings = false
Remember to set them back to true at the end or they'll be off for the rest of your Access session

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Isn't the syntax of the command as follows? (pass in the desired settings to the method)

DoCmd.SetWarnings (False)
(the brackets may be omitted, if desired)

In Excel, mind you, a value is assigned to the property:
Application.DisplayAlerts = False
 
Krinid - probably is so - not used Access in anger for a little while but I would've thought it'd be quite obvious once it's being typed in....

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top