Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316

    Unanswered: Null-ing all fields on a form

    Does anyone have a small routine that can Null all txt's and cbo's on any given form?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2003
    Posts
    23
    If the controls are bound to fields then Me.Undo will do it. Otherwise you could do this:

    Dim ctl As Control

    For Each ctl In Me
    If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then
    ctl = Null
    End If
    Next

    hth

    /Svein Erik

  3. #3
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    Thanks a lot, that worked perfectly.

Posting Permissions

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