Results 1 to 3 of 3
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Combo Boxes - Updating Values Automatically (A2K SR1)

    I have a form that contains two combo boxes. One for Year and One for month. Both combo boxes provide a selection based on value lists entered when the boxes were created. When a command button is pressed, queries begin that calculate the cumulative value for data from another table through the current Month and Year selected by the user. The programming within the command button then increments the month and year (via for next loops) to calculate the cumulative data for each Year and Month combination until the end of the data stream.

    Here is my problem.... The queries being used set the current month and year less then or equal to the month and year in the Combo Box selection. I assumed (which was my first mistake) that if I re-set the value of the combo box in the program, (i.e, Forms!STARTUP!List40.Value = M),(M is the new value) it would be as if the user was entering a new value before the next query was launched.

    ... Apparently I am incorrect in my assumption as this does not work.
    How do you do this????

    I can't figure it out.... <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>
    Regards,

    Gary
    (It's been a while!)

  2. #2
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Combo Boxes - Updating Values Automatically (A2K SR1)

    Let me make this simpler,

    How could you update a combox box without user input??
    Regards,

    Gary
    (It's been a while!)

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Combo Boxes - Updating Values Automatically (A2K SR1)

    ok - I actually got this to work....

    The problem I ran into is that I tried to use the variable in a For Next loop to set the value of the combo box. (Access did not like this) However, by setting the value in the For Next loop to a Variable set as an integer equal to the value in the For Next Loop, I was able to pass this value to back into the combo box.

    What is really neat, is that as the loops are running, the values in the combo boxes change on screen, thus, providing a visual review of what is happening.

    On to the next problem....
    <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21>
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

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