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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box Help

Status
Not open for further replies.

robert693

Programmer
Jun 20, 2001
40
US
I have a check box called FullTime in a form that one checks if an employee is full time. If an employee is not full time then a label and a text box appear with further information. They only are supposed to appear when the check box is not checked. I used this in the form current event:
Private Sub Form_Current()
If Me!FullTime.Value = Yes Then
Me!Label113.Visable = False
End If

This does not work. Any help would be greatly appreciated!
 

Private Sub Form_Current()
If Me!FullTime.Value = True Then
Me!Label113.Visable = False
End If

yes = true
no = false

or it may be

yes = -1
no = 1

if the first don't work try the numbers
 
You may need to fully complete the IF..THEN statement, to make sure the textbox/label guy gets turned on or off depending:

Private Sub Form_Current()
If Me!FullTime.Value = True Then
Me!Label113.Visible = False
else
me!Label113.Visible = TRUE
End If

The way you have it now, if FullTime is FALSE, the loop exits right awy, and never turns the Label back on.

And make sure you spell VISIBLE correctly... :)

Jim

How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
Now that I've looked back at my response, I think the VALUE property is unnecessary:

If me!Fulltime = TRUE then
....
else
....

Anytime you evaluate a TRUE/FALSE (binary) type, you can use YES/NO, True/False, or -1/0, respectively. These three statments are functionally alike:

If Me!Fulltime = -1
If Me!FullTime = TRUE
If Me!FullTIme = YES

I usually use TRUE or FALSE because it's clearer, but someone else may prefer 0 and -1.

Jim
How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top