I have seen a lot of topics here when I was searching for what I want to do
I have text control over combocontrol, the same width, height, top, left
I need to dlookup yes/no field in table and if yes make combo visible, if no make text visible
so I tried :
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim Chye As Boolean
Chye = DLookup("ER", "tbl_subA", "AD= " & Me.AD)
If Chye = True Then
Me.EC.Visible = True
Else
Me.WE.Value = True
End If
End Sub
I get runtime error 2001 that states that I cancelled the previous operation
any idea