Access can't find form

B

benb

I want to change some properties of a form before using OpenForm to open it.
When using the code Forms![frm_Entry].DataEntry = True, I get an error
message saying that Access can't find the form frm_Entry referred to in the
Visual Basic code. I know the form is there and I know it is spelled
correctly, so I can only conclude that the macro can't "see" the form,
something like public and private variables. I put the code in a subroutine
(the code is part of a click event), but that doesn't seem to solve it. How
can I make Access "see" the form so that I can amend it's properties in the
VB code? THANKS!
 
D

Douglas J. Steele

The Forms collection only contains those forms that are open. In other
words, you can't use that approach to change properties until after you've
opened the form.
 

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