Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically check a checkbox

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi

I have table that has a field (yes/no)
I want to lookup that field and automatically check or uncheck the check box on the form.

Can that be done?
 
If the field is defined as a Yes/No field then when you add the field to the form, it will automatically be a checkbox (that's the default type for a Yes/No field).
J. Jones
jjones@cybrtyme.com
 
Hi,

If you mean you want the check box to automatically check or uncheck based on a certain event...you can use an if, then statement something along these lines.


Private Sub Text2_AfterUpdate()
If Me.Text2 = "Peter" Then
Me.Check0 = True
Else:
Me.Check0 = False

End If


End Sub

HTH.

Peter Remember- It's nice to be important,
but it's important to be nice :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top