Make textbox visible based on checkbox???

T

This Guy

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
 
S

SteveM

What references do you have in your project?

Do you at least have 'VBA for Applications'?

Steve
 
T

This Guy

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]
 
T

This Guy

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]
 
Top