Hi

I'm trying to clear the form using the code below

Code:
 
Function ClearAll(frm As Form)
Dim ctl As Control

For Each ctl In frm.Controls
   Select Case TypeName(ctl) 'ctl.ControlType
      Case "TextBox"
           ctl.Value = ""
      Case "OptionGroup", "ComboBox", "ListBox"
          ctl.Value = Null
      Case "Checkbox"
         ctl.Value = False
      'Case ac
   End Select
Next
End Function
But return error Runtime error 438

Name:  erro-vb.jpg
Views: 313
Size:  19.3 KB
error occurs because my combobox is Style = Dropdown List