Hi guys,
I'm kinda challenged with a little thing.
I've created a little procedure to refresh a combo box. I've put that procedure in a module.
Now when I run this code from a form with
RefrCombo(me.Combo1) it tells me an Object is required. It looks like it transferes the Value of the object instead of the object itself.
How should I do it?
Thanks!
I'm kinda challenged with a little thing.
I've created a little procedure to refresh a combo box. I've put that procedure in a module.
Code:
Sub RefrCombo(ComboCtrl As Control) 'refreshes the control and makes it null if the old value is not in the new list anymore
ComboCtrl.Requery
If IsNull(ComboCtrl.Column(0)) And Not IsNull(ComboCtrl) Then ComboCtrl = Null
End Sub
Now when I run this code from a form with
RefrCombo(me.Combo1) it tells me an Object is required. It looks like it transferes the Value of the object instead of the object itself.
How should I do it?
Thanks!