469,612 Members | 2,182 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Problem with Access 2007 runtime


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
1 3770
1,287 Expert 1GB
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.

Similar topics

4 posts views Thread by Tom van Stiphout | last post: by
4 posts views Thread by David Kates | last post: by
1 post views Thread by rickcross | last post: by
reply views Thread by Chris O'C via AccessMonster.com | last post: by
reply views Thread by Tom Gibbons | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.