That a lot of code compared to what Piet and I recommended:
Me.TMMInv.Visible = Me.TM
Me.TMMAct.Visible = Me.TM
Me.TM.Visible = Not Me.TM
Or, if you really feel the need to use an If block:
If Me.TM Then
Me.TMMInv.Visible = True
Me.TMMAct.Visible = True
Me.TM.Visible = False
Else
Me.TMMInv.Visible = False
Me.TMMAct.Visible = False
Me.TM.Visible = True
End If
But you're the one that has to read and work with the code
so it's your call.
One important point, the value of a chack box is not a
string so you should not put quotes around the -1
--
Marsh
MVP [MS Access]
Thanks Marshall. I used the undernoted on the AfterUpdate and on the Form
OnCurrent and it seems to be working.
If [TM] = "-1" Then
[TMMInv].Visible = True
[TM].Visible = True
Else
[TMMInv].Visible = False
[TM].Visible = True
End If
If [TM] = "-1" Then
[TMMAct].Visible = True
[TM].Visible = True
Else
[TMMAct].Visible = False
[TM].Visible = True
End If
Marshall Barton said:
Alan wrote:
There may be a simple answer to this but I've afraid it's beyond me! I am
trying to make a combo box appear only when a Check Box is 'ticked'. Can
anyone help? i am using Access 2007 and have only one table in my database.
Use the check box's AfterUpdate event procedure to do that:
Me.thecombobox.Visible = Me.thecheckbox
If the check box is bound to a field in the form's record
source, put the same line of code in the form's Current
event procedure.