SetTempVar error on installed db

S

Steve

I am creating an application using MS Access 2007. I have created the
installation package and have set the registry key for a trusted
location. I am having trouble with an error message. As part of the
startup macro I initailize some tempvars. I am getting an error
message on the first macro action for SetTempVar in the startup
macro. The app exits upon selecting stop all macros from the error
dialogue.

Error message:

The command or action SetTempVar isn't available now.
*You may be in a read-only database or an unconverted db from an
earlier version.
* The type of object the action applies to isn't currently selected or
in the active view.
Use only those commands that are available for this database.

The call occurs in my startup macro. I have no problem running the
macro when I run the db on my computer without going through the
install process.
On the installed app, I can see the MS Access 2007 ribbon so I know I
am in Access 2007 / 2007 runtime.

I do not think I have created a read-only db and believe the file type
is .accdb. I do not even see the relevance of the second part of the
error message: type of object action applies to is not selected. It
is a tempvar, I did not think it was associated with any objects.

Steve
 

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