General discussion

Locked

How do I ????

By JoePlaisted ·
Hello,
I need to know how I get a memo field on MSAccess 2000 to stay unactivated until a yes/no check box is checked and then the memo field becomes active and allows info to be typed in it. Or if the check box is un-checked the memo field becomes un-active again.

Thank you

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by CptOmlly In reply to How do I ????

That is actually pretty simple. On your form, create a checkbox and textbox. I'll call them Check1 and Text2. nder properties, set the default value for Check1 to false, and set Enabled property for Text2 to disabled. Create an event for AfterUpdate on Check1 as follows:

Private Sub Check12_AfterUpdate()
If Check1.Value = True Then
Text2.Enabled = True
Else: Text2.Enabled = False
End If
End Sub

This will result in the form defaulting to checkbox unchecked and the textbox disabled. When the box is checked, textbox will be enabled. If it is unchecked, the textbox will go back disabled.

Hope this helps.

Collapse -

by CptOmlly In reply to

Sorry, typo in code....

That should be "Private Sub Check1_AfterUpdate"

Thanks

Collapse -

by JoePlaisted In reply to

Poster rated this answer.

Collapse -

by JoePlaisted In reply to How do I ????

This question was closed by the author

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums