Appending Records Warning Dialog...

JaedenRuiner

Registered User.
Local time
Today, 14:30
Joined
Jun 22, 2005
Messages
154
Okay,

I'm not sure if this is the right discussion to ask this, but it seems the closest to my question, so I apologize if i'm mis-posting.

I'm doing a "run-time" insert into a table, from the VB Script. A button pops up an InputBox, and the returned string is added into the table, via a SQL command. However, upon execution of the SQL command:
Code:
st=InputBox("New Entry")
call DoCmd.RunSql("insert into table1 (field1) values ('" & st & "');")
I get a warning dialog pop-up from access, informing me that it's about to append 1 row(s) into the table. Is there anyway to deactivate that dialog warning box so it doesn't pop up every time i use an insert into statement?

Thanks
Jaeden "Sifo Dyas" al'Reac Ruiner
 
Docmd.setwarnings false should do the trick.
 
Edtab's solution will definitely do the trick.

Remember however:
** You will need to turn them back on after your procedure **

Code:
docmd.setwarnings false
st=InputBox("New Entry")
call DoCmd.RunSql("insert into table1 (field1) values ('" & st & "');")
docmd.setwarnings true
 

Users who are viewing this thread

Back
Top Bottom