Form not working

D

Dwaine Horton

OK, I created a form with several text boxes unbound and two command buttons.
One command button is to open an external database and store the filepath to
one of the text boxes. The other command box does some DAO to perform a
query and return the result to a text box.

Everything worked fine when I was designing and testing. I then saved my
work and closed Access and now by command box's don't work. I have code in
the click event of the command box.

What gives?
 
D

Dirk Goldgar

Dwaine Horton said:
OK, I created a form with several text boxes unbound and two command
buttons.
One command button is to open an external database and store the filepath
to
one of the text boxes. The other command box does some DAO to perform a
query and return the result to a text box.

Everything worked fine when I was designing and testing. I then saved my
work and closed Access and now by command box's don't work. I have code
in
the click event of the command box.

What gives?


Do you get an error message? If so, what is it?

Does other VBA code in the database work?

What version of Access are you using?

If you are using Access 2007, is your database in a trusted location?

Was there any message when you opened the database about enabling/disabling
code or macros?
 
D

Dwaine Horton

No error message.
No other VBA code to test.
Access 2007
Database is saved to local hard drive
No message when opened about macro's.
 
D

Dirk Goldgar

Dwaine Horton said:
No error message.
No other VBA code to test.
Access 2007
Database is saved to local hard drive
No message when opened about macro's.


Where onn the local hard drve? By default, Access 2007 will not let VBA
code run in a database that is not in a trusted location, as designated in
the Trust Center settings. Most commonly that is your Documents folder,
though you may have to explicitly specify that via the Trust Center.
 

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