Opening Access from VB - Can't Set Warnings True

BigJimSlade

Registered User.
Local time
Today, 01:23
Joined
Oct 11, 2000
Messages
173
Hi, Big Jim here:

Most bizarre problem. I open Access from VB using the following code:

Public gAccess As New Access.Application

gstrDatabaseFullPath = [Whatever database I am opening.mdb]
gAccess.OpenCurrentDatabase gstrDatabaseFullPath
gAccess.DoCmd.SetWarnings True
gAccess.Visible = True

(References = DAO 3.51 Object Library and Access 10.0 Object Library)

Now when I do this, the application opens up just fine and I can see the database. However, the warnings are off, because I am forced to save dummy queries I just want to close out of and no warning messages come up when I attempt to modify data (DDL).

Any thoughts?

Thanks in advance,

Big Jim
 
try this:

ur current code: gAccess.DoCmd.SetWarnings True

new code: gAccess.DoCmd.SetWarnings = True

just try adding an equals sign. just a guess try it...
 
Thanks zambam, but that didn't work.

I should add that even if I go into Access and try running a Macro that sets the warnings to True, I still receive no warnings. I physically have no way of setting the warnings to true.

Thanks!

Big Jim
 
Big Jim,

DDL as in Data Definition Language?
The setting you're after only applies to DML.

RV
 

Users who are viewing this thread

Back
Top Bottom