Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006

    Unanswered: Clear subforms data

    Hi everyone,

    My form has two listboxes and and a tab control that contains multiple subforms. Update to one listbox causes change in another, which, in turn, changes data in all subforms. Now, when a first list is updated again, the data in tabs remains until second list value is changed. How do I clear all subforms to "clean up" past data ?

    What I am looking for is some kind of a loop that will go through all controls on all forms and clear them out. It is a pain to enter code for each control ( ctrlManufId = "" ) separately. Anyone knows how to do this ?


  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    This give you a start?

      Dim ctl                As Control
      For Each ctl In Me.Controls
        'do your thing
      Next ctl

Posting Permissions

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