By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,973 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,973 IT Pros & Developers. It's quick & easy.

Problem with Access 2007 runtime

P: 3

I'd created a MDE under Access 2003. It is now under testing stage. Some of the users will use Access 2003 runtime and some will use Access 2007 runtime to run this MDE. I installed the Access 2007 runtime on a test machine and place the MDE in the Desktop for user's initial testing. I did not create a trust area for this MDE in the test machine as well as in my development machine.

When I tested the MDE using /runtime switch in my development machine under Access 2007 environment, all was well. When user tested the same MDE under the 2007 runtime machine, user login is successful; open update form for data input is also successful. However, they encountered the following error when this form tried to create a record in the db via the VBA code under the 'create data' button:

"The expression On Click you entered as the event property setting produced the following error: Syntax error on INSERT INTO statement."

The questions I would like to seek help with are:

1. How can I debug this error in the test machine?
2. Is there a difference in behavior between Access 2007 runtime and the full version with the /runtime swich?
3. Is this error related to the missing trust zone?
4. Is there other issues I must look into when I test the Access 2003 MDE under different runtime environment?

Thanks for your help.

Dec 23 '09 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,287
The first thing you should do when creating a runtime version is make sure that every procedure or function has error handling. If you don't handle errors in runtime, you application will lose any variables in memory and probably not recover well.
Given the error message, you want to take a look at the insert statement that is being created. I have to assume that your code assembles a string which it then tries to DoCmd.RunSQL. The easiest way to debug this in runtime is to display your SQL string in a MsgBox before you try to run it.
Dec 23 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.