Make textbox visible based on checkbox???

G

Guest

I have a textbox named txtTitle that is bound to a hyperlink field in my
table. I also have a checkbox named check65 bound to a yes/no field in my
table.

What I want is the textbox, txtTitle, to be invisible unitl the checkbox is
selected, then visible. I have tried this:

Me.txtTitle.Visible = Me.Check65

in the AfterUpdate Event of my checkbox and it gives me the message,
"Microsoft Access cannot find the Macro 'Me'"

What am I doing wrong?

Thanks.
 
J

Jeff Boyce

Try

Me!txtTitle.Visible = Me!Check65

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

What references do you have in your project?

Do you at least have 'VBA for Applications'?

Steve
 
G

Guest

Me!txtTitle.Visible = Me!Check65

Gives the same error. I do have VBA for applications.

How can I make this work? Should be so simple!
 
J

John W. Vinson

Me!txtTitle.Visible = Me!Check65

Gives the same error. I do have VBA for applications.

How can I make this work? Should be so simple!

If you're typing this text directly into the event property line you'll get
this error message. The form property should say

[Event Procedure]

and you'll need to click the ... icon by it and invoke the Code Builder.
Access will give you the Sub and End Sub lines, just edit this additional line
between them.

John W. Vinson [MVP]
 
G

Guest

I'm an idiot. Please excuse my ignorance. Thank You.

John W. Vinson said:
Me!txtTitle.Visible = Me!Check65

Gives the same error. I do have VBA for applications.

How can I make this work? Should be so simple!

If you're typing this text directly into the event property line you'll get
this error message. The form property should say

[Event Procedure]

and you'll need to click the ... icon by it and invoke the Code Builder.
Access will give you the Sub and End Sub lines, just edit this additional line
between them.

John W. Vinson [MVP]
 

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