Results 1 to 2 of 2

Thread: Check all fields have been entered

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    London, United Kingdom
    Posts
    14

    Question

    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?

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696

    Talking

    Try using The below code


    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width