Docmd.RunSql does not work in .mde

M

msing2me

I am bulding an application in Access 2002, the code works fine in
..mdb version, but when i create .mde file the docmd.runsql does not
work. Looks like a connectivity issue, any inputs are highly
appreciated.
 
D

Douglas J. Steele

Assuming you have error trapping (you really need to in MDEs), what's the
exact error you're getting? What's the code that's failing?
 
M

msing2me

The code is :

Private Sub Update_Click()

SqlStr = "Update SQL....Where ....;"
Docmd.RunSql (SqlStr)

End Sub

The SQL is tested in Query Panel which works fine,but the above piece
of code work fine in .mdb, but when i create .mde, the code does not
work.
It does not generate any error message, as i don't use any error
trapping. I have defined a DAO recordset for query purpose and putting
the results on the form, which works fine in both versions.
 
D

Douglas J. Steele

You really should include error trapping.

Try putting in error trapping, and changing DoCmd.RunSql (SqlStr) to

CurrentDb.Execute SqlStr, dbFailOnError

Unfortunately, what little you've shown of your SQL doesn't give me anything
else to go on.
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top