no form in proj explorer?

P

Pendragon

Access03/WinXP

Doing some simple testing to teach myself a few things. Simple database
with only two forms. One form only has a label with basic text (frmTest).
The other form (frmSwitchboard) has a couple command buttons with options.

When I am in the VBA editor, only the frmSwitchboard displays in the project
explorer. If I try to write code for a command button with a string variable
reference to the form which only has a label, the error message is that
Access can't find the form frmTest.

Why is this the case? Obviously, forms tied data tables show up, but just a
form by itself doesn't.

Thanks for the lesson.
 
S

sfisher973

The forms don't show up in the project explorer until after you add some vba
code to the form. If you used the wizard on the buttons of your switch
board to open forms for example then they were created as macros instead of
code. There is an option on the "Database Tools" tab to convert macros to
code on the form. It will then show up in the project explorer.
 
S

sfisher973

Oh, I see the problem might be with frmTest and not having code module on it.
You should still be able to access the objects on its form if it is open with
something like:

forms("frmTest")![labelname].caption = "test message"
 

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