Display a combobox depending on another combobox

V

Veli Izzet

Hi all,

I want to display combo29 if combo22 has a certain value.

Private Sub Combo22_AfterUpdate(Cancel As Integer)
If Me.Combo22 = 3 Then
Me.Combo29.Visible = True
Else
Me.Combo29.Visible = False
End If

Gives error, any help?
 
O

Ofer

What is the error?
Also it doesn't make sense, the after update doesn't have cancel in it, only
the before update

'AfterUpdate(Cancel As Integer)

So if you wrote it, so remove it, and then try it running again
 
V

Veli Izzet

Thanks,

It was left from the copy-paste operation between the before_update &
after_update, the problem was this syntax
 
Top