+ Reply to Thread
Results 1 to 2 of 2

Looping thru subform just as checkbox.

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Looping thru subform just as checkbox.

    Hi,

    I have create about 5 checkbox called:
    chkbox1, chkbox2, chkbox3, chobox4, and chbox5.
    For each checkbox, I add a subform on the form, so I end up having 5 subform(1...5).

    When I loop thru the chkbox, i simple do:
    For lngNum= 1 to 5
    If .controls("chkbox" & lngNum).value = True then
    Msgbox "Yes"
    End If
    Next

    Now I also want to do the same thing but for my subform.
    Each data are entered differently in each subform, so how can I write the code once for loop thru each subform?

    Thanks

  2. #2
    Registered User
    Join Date
    11-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007/10
    Posts
    18

    Re: Looping thru subform just as checkbox.

    not clear what you are asking - but if you are running this code from the main form and your subforms are called sf1, sf2 etc you could use

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Looping through CheckBox Controls on Excel Form
    By Cooper2251 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-19-2013, 04:00 PM
  2. [SOLVED] Referencing a subform on another tab
    By pdauction in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-15-2012, 08:32 AM
  3. set .Visible = True on Subform, From Another Subform
    By Whizbang in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2011, 04:51 PM
  4. Trouble with a subform
    By J.wills in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2009, 02:34 AM
  5. Format Subform
    By pkeegs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2006, 04:15 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1