Can anyone tell me what, in the following code, I would need to change to make it work when I convert it to an ActiveX form ?

VB Code:
  1. Private Sub Check_Fields()
  2.    
  3.     For Each Ctrl In frmMain
  4.         If TypeOf Ctrl Is TextBox Or TypeOf Ctrl Is ComboBox Then
  5.             If Ctrl = "" And Ctrl.Visible Then
  6.                 FieldsOK = False
  7.                 MsgBox "You cannot have any blank fields !", vbOKOnly, "Empty Field"
  8.                 Ctrl.BackColor = vbWhite
  9.                 Ctrl.SetFocus
  10.                 Exit Sub
  11.             End If
  12.         End If
  13.     Next Ctrl
  14.    
  15.    
  16. End Sub


Thanks a lot ....