|
-
Oct 24th, 2001, 06:46 AM
#1
Thread Starter
Frenzied Member
Spot the error in this code .....
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 ....
-
Oct 24th, 2001, 06:54 AM
#2
Fanatic Member
VB Code:
For Each Ctrl In [b]frmMain.Controls[/b]
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
-
Oct 24th, 2001, 07:00 AM
#3
Thread Starter
Frenzied Member
Nope ... that didn't work.
The code does work before you convert the form, but I guess IE5 can't interpret it when its an ActiveX !
Any other ideas ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|