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!

Set field value using a check box 1

Status
Not open for further replies.

rj51cxa

Technical User
Mar 16, 2006
216
GB
I have a form which displays information for personnel based on whether a field ([position]) contains the word "Argosy". I would like users to be able to stop personnel details from being displayed by setting the [position] field to null (i.e. removing "Argosy").

I have tried using a check box (uncheck to remove "Argosy") but I cannot get this to work. I set the Control Source to "[position]" and then created an IIF statement in the "Before Update" event, but all this does is to make the check box un-useable.

Am I trying to do something impossible? Any pointers would be much appreciated.

Best Regards
John
 
[/code]
Private Sub Check4_Click()
If Me.Title = "Argosy" Then
Me.Title = Null
Me.Check4 = False
Else
Me.Title = "Argosy"
Me.Check4 = True
End If
End Sub


Private Sub Form_Current()
If Me.Title = "Argosy" Then
Me.Check4 = True
Else
Me.Check4 = False
End If
End Sub
[/code]

Will not work on a continous form.
 
Thanks MajP, that did just what I wanted.

Best Regards
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top