Setting fields to visible true/false based on text field

mperet

New member
Local time
Yesterday, 20:00
Joined
Jun 4, 2007
Messages
3
I've got a continous form that I'm trying to make look cleaner, it has 12 time slots and 5 appointment slots for each time, plus a check box and an arrival time slot under. I'm trying to make the check box and arrival time box invisible if there is no appointment scheduled, but all that's happening right now is that either the check box and time slot on every record becomes invisible.

Here's my code:
If Not IsNull(Me.Outbound1) Then
Me.O1ArrTime.Visible = True
Me.O1Done.Visible = True
Else
Me.O1ArrTime.Visible = False
Me.O1Done.Visible = False
End If


The field Outbound1 is a text field. If it contains anything, it will be alpha-numeric (CRE40187 or HANY49070 or similar, all unique.

Help!
 
A few things:
1) If you have a single record with 12 time slots and 5 appointment slots then I suspect you've failed to normalize your data.
2) Look at your continuous form in design view. There is only a single O1ArrTime textbox. If you hide it, it is hidden. Everywhere. Microsoft would say, "this behaviour is by design."
3) If your values are booleans, you don't really need an If...Else...End If block to do assignments. Consider...
Code:
Me.O1ArrTime.Visible = Not IsNull(Me.Outbound1)
 

Users who are viewing this thread

Back
Top Bottom