View Full Version : Appending Records Warning Dialog...


JaedenRuiner
06-23-2005, 05:33 PM
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:

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

edtab
06-23-2005, 05:51 PM
Docmd.setwarnings false should do the trick.

bradcccs
06-23-2005, 09:51 PM
Edtab's solution will definitely do the trick.

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


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