Results 1 to 5 of 5
  1. #1
    User777 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    2

    Using Tag Property of combobox controls


    Hello all...need some direction on an issue regarding the tap property of several combobox controls...
    I have a form that has 10 combobox controls with the same tag property..the values for the combobox are only YES/NO...
    What i want the form to do is to look at the values of the comboboxes with the same tag and tell me if any of them have a "NO", and if so to populate an unboud textbox with "NO"...or if they are all "YES", the populate the textbox "YES"...
    Can this be done using the tag property?...Please advise...thank you!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    I suppose could be done, I've never used tag property.

    But why not just code in each checkbox Change event procedure:

    Me!fieldname = Me.checkboxname
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    I'm with June on this one. I tried tinkering around in VBA calling the tag, but I kept getting compile errors. That code, per your requirements, would be an If...Then with 10 ANDs in there (Me.cbo1 = "yes" AND Me.cbo2 = "yes"...). I assume you may have known that already thus trying to use a common Tag property.

  4. #4
    User777 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    2
    Quote Originally Posted by TG_W View Post
    I'm with June on this one. I tried tinkering around in VBA calling the tag, but I kept getting compile errors. That code, per your requirements, would be an If...Then with 10 ANDs in there (Me.cbo1 = "yes" AND Me.cbo2 = "yes"...). I assume you may have known that already thus trying to use a common Tag property.
    Hi all
    THank you for your replies...what i ended up doing is adding a formula to the unboud textbox to look for values of each combobox....i added the formula below in the control source of the textbox...see below:

    =IIf([AuditType]="RPP" And [Sec1_01]="YES" And [Sec1_02]="YES" And [Sec1_03]="YES" And [Sec1_04]="YES" And [Sec1_05]="YES" And [Sec1_07]="YES" And [Sec1_08]="YES" And [Sec1_09]="YES" And [Sec1_10]="YES" And [Sec1_11]="YES" And [Sec1_12]="YES","YES","NO")))

    so basically, if any of the comboboxes (Sec1_n) have a no, the the textbox value will show "NO"....they all have to have "YES" for the value in the textbox to show "YES"...
    Thanks again for eveyone's insight.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Sorry, I did not ready OP thoroughly enough and did not realize the true requirement. That does make for a long expression. I suppose you will have to replicate it in queries/reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  2. Combobox-dependent show/hide controls
    By focosi in forum Forms
    Replies: 3
    Last Post: 07-31-2011, 06:47 AM
  3. need help - combobox controls table?
    By RedGoneWILD in forum Programming
    Replies: 15
    Last Post: 09-07-2010, 04:50 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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
  •  
Other Forums: Microsoft Office Forums