Can't find form msg

P

Pixie

Hello!
I created a table with all my users and whether they were employees or
managers so I could enable/disable buttons on my main menu. I created a form
from this table that opens with hidden with an AutoExec macro that filters on
the CurrentUser.

It works fine in the sense that with form opens hidden with the right filter
and the buttons are disabled appropriately for the user but first I get a
message when the database opens that says: My Database can't find the form
'frmUser' referred to in a macro expression or Visual Basic code.

I believe it's only used in the AutoExec macro and in the OnOpen event of
the Main Menu as a condition of that macro to enable/disable buttons. Both of
those work. Why am I getting this message?

I would appreciate any help.
 
S

Stuart McCall

Pixie said:
Hello!
I created a table with all my users and whether they were employees or
managers so I could enable/disable buttons on my main menu. I created a
form
from this table that opens with hidden with an AutoExec macro that filters
on
the CurrentUser.

It works fine in the sense that with form opens hidden with the right
filter
and the buttons are disabled appropriately for the user but first I get a
message when the database opens that says: My Database can't find the form
'frmUser' referred to in a macro expression or Visual Basic code.

I believe it's only used in the AutoExec macro and in the OnOpen event of
the Main Menu as a condition of that macro to enable/disable buttons. Both
of
those work. Why am I getting this message?

I would appreciate any help.

Sounds like you have a reference to frmUser in a Query. Maybe the Query runs
before the form opens?
 
P

Pixie

Hi Stuart,
I checked the object dependencies and no objects depend on it and it only
depends on the table it was created from. I selected it from the drop-down
list of forms when I used the OpenForm command in the AutoExec macro which
appears to be working correctly.

The only other place I'm currently using it is as a condition in my Disable
Button macro for the Main Menu and I used the builder for that to make sure
my syntax was correct. If I click OK to get rid of the message box and open
the Main Menu manually, the buttons are enabled/disabled appropriately.

Say... why doesn't my Main Menu appear anymore? Did my AutoExec override the
Startup? Or is that my problem?
 
P

Pixie

Never mind. I set my startup form to none and added it to my AutoExec macro
and it works likes a champ.

Thanks for your help.
 

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