Here's some code I'm using when using a data control in one of my apps:
vb Code:
Private Sub Data1_Validate(Action As Integer, Save As Integer) '(check1 is bound to "used", a yes/no statement If Check1.Value = vbChecked Then Text1.Enabled = False Text2.Enabled = False Command1.Enabled = False Else Text1.Enabled = True Text2.Enabled = True Command1.Enabled = True End If End Sub
However, when I come up to an entry that has "used" as true (and therefore, has the checkbox ticked), nothing happens. But then, when I go to another entry, the code runs, leaving the textboxes and button disabled.
Any ideas on this will be thanked.




Reply With Quote