PDA

Click to See Complete Forum and Search --> : Check all fields have been entered


Sacha Rowland
Apr 17th, 2000, 10:42 PM
I have a database form with 280 fields on it (don't ask)
Does someone know some script I can use to check that all fields for the current record have been entered?

Ianpbaker
Apr 17th, 2000, 11:09 PM
Try using The below code



private sub checkfields()

Dim myControl As Control
For Each myControl In Controls
If TypeOf myControl Is TextBox Then
If myControl.Value = "" Then
'some alert code
end if
End If
Next
End Sub


you can change the if typeof is textbox to different controls if you have other controls than textboxes

This should sort out your problem

Good Luck
Ian

[Edited by Ianpbaker on 04-18-2000 at 05:11 PM]