Results 1 to 2 of 2
  1. #1
    GinaFlan is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Location
    Texas
    Posts
    68

    Help!!!!! Another way to write this code AfterUpdate for combo box visible

    It's not a typo
    It only works for the second one "Revenue recorded in same month as received Look at Budget Monthly"
    I have multiple goals



    Private Sub ComboGoals_AfterUpdate()



    Me.Comboyesorno.Visible = ComboGoals = "Inventory changes are tracked monthly"
    TxtActualBenchmark.Enabled = Not Me.Comboyesorno.Visible
    TxtActualBenchmark.Visible = Not Me.Comboyesorno.Visible


    Label32.Visible = True = Not Me.Comboyesorno.Visible


    Me.Comboyesorno.Visible = ComboGoals = "Revenue recorded in same month as received Look at Budget Monthly"
    TxtActualBenchmark.Enabled = Not Me.Comboyesorno.Visible
    TxtActualBenchmark.Visible = Not Me.Comboyesorno.Visible
    Label32.Visible = True = Not Me.Comboyesorno.Visible


    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Of course it only works for the second one, it is the last condition tested.

    You want the combobox to be visible if either of those statements are encountered.

    Private Sub ComboGoals_AfterUpdate()
    Me.Comboyesorno.Visible = (Me.ComboGoals = "Inventory changes are tracked monthly" Or Me.ComboGoals = "Revenue recorded in same month as received Look at Budget Monthly")
    Me.TxtActualBenchmark.Enabled = Not Me.Comboyesorno.Visible
    Me.TxtActualBenchmark.Visible = Not Me.Comboyesorno.Visible
    Me.Label32.Visible = True = Not Me.Comboyesorno.Visible
    End Sub
    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: 30
    Last Post: 07-21-2014, 02:46 PM
  2. Replies: 2
    Last Post: 06-09-2012, 01:56 AM
  3. Replies: 36
    Last Post: 10-04-2011, 11:19 PM
  4. AfterUpdate event code error?
    By agripa86 in forum Programming
    Replies: 3
    Last Post: 08-12-2011, 09:12 AM
  5. Replies: 2
    Last Post: 01-06-2011, 04:38 AM

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