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:
Private Sub Check_Fields() For Each Ctrl In frmMain If TypeOf Ctrl Is TextBox Or TypeOf Ctrl Is ComboBox Then If Ctrl = "" And Ctrl.Visible Then FieldsOK = False MsgBox "You cannot have any blank fields !", vbOKOnly, "Empty Field" Ctrl.BackColor = vbWhite Ctrl.SetFocus Exit Sub End If End If Next Ctrl End Sub
Thanks a lot ....




Reply With Quote