cant find field

S

seeker

Why does form!frmHealthstatssecondcheck!cmbmembername.visible = true give me
this error

cant find the field cmbmembername referred to in your expression.

cmbmembername is not a field it is a combo box on form
frmhealthstatssecondcheck
 
J

Jeff Boyce

We're not there. We can't see what you're working on.

Where is this happening? What are you attempting to do when this happens?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
D

Dirk Goldgar

seeker said:
Why does form!frmHealthstatssecondcheck!cmbmembername.visible = true give
me
this error

cant find the field cmbmembername referred to in your expression.

cmbmembername is not a field it is a combo box on form
frmhealthstatssecondcheck


That doesn't look like an exact quote of your statement. If it were, things
would be capitalized differently. In questions like this, it is very
important that you copy and paste the failing statement into your message,
so that we don't go off on wild goose chases over your typos.

If the captialization is the *only* thing that isn't quoted accurately, then
there is an error in your form reference. It should be:

Forms!frmHealthstatssecondcheck

*not* :

form!frmHealthstatssecondcheck

However, that may just be a misquote on your part. If that isn't the
problem, double-check the exact spelling of the control name,
"cmbmembername". Capitalization doesn't matter, but correct spelling does.

Also, where is this statement being executed? Is in the code module of the
form, frmHealthstatssecondcheck? Is that form open when the statement is
executed?
 
J

John W. Vinson

Why does form!frmHealthstatssecondcheck!cmbmembername.visible = true give me
this error

cant find the field cmbmembername referred to in your expression.

cmbmembername is not a field it is a combo box on form
frmhealthstatssecondcheck

Try Forms!frmHealth... instead of Form!frmHealth...

This will look in the Forms collection (all open forms) for the form of that
name. If your code is in fact on that form you can simplify the code by using

Me!cmbMemberName.Visible = True

instead of the full forms reference.

Note that a Subform is not a member of the Forms collection and must be
referenced via the mainform and the Subform control name:

Forms!mainform!subformcontrol.Form!controlname.Visible = True
 

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