Results 1 to 7 of 7
  1. #1
    MrDummy is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    50

    Update ComboBox when clicking next record

    Hello,

    I have a form containing a ComboBox. When a value is seletected the record is selected and all the information on the form is updated. If I add a Button (via the wizard) and select "Next Record" all the information on the form is updated however the ComboBox is not updated to that next value. How do I overcome this issue?

  2. #2
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Hi!

    What is the data source of your combo box?

    Gina

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    When you say

    "When a value is seletected the record is selected and all the information on the form is updated"

    do you really mean that an existing Record is retrieved?

    When you say

    "...all the information on the form is updated..."

    it means that the info on the Record is changed and then saved.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    MrDummy is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    50
    The record is retrieved from a table when a selection is made in the comboBox. But when I want to retrieve the info from the next record by using a button all the info from the next record is retrieved but the ComboBox remains unchanged.

    There is no Control Source. If I make a selection here, the ComboBox can't be used. However there is a row source.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Well, the Combobox is Unbound, as it should be, for this kind of thing, and so there is no way for it to know which Record is the Current Record.

    The Value of an Unbound Control is the same for all Records. Why does it matter?

    You could use code in the Form_Current event to either set the Combobox to Null, if it's having the previous selection displayed is distracting, or you could use the DLookUp function in the same event to set it to the appropriate Value for the Current Record.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    MrDummy is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    50
    Many thanks. Thought there may be an easier solution. Used the DLookUp function

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 2
    Last Post: 09-15-2015, 03:08 AM
  2. Replies: 10
    Last Post: 12-17-2014, 03:31 PM
  3. Replies: 7
    Last Post: 05-12-2014, 06:05 AM
  4. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  5. Replies: 9
    Last Post: 12-18-2010, 12:51 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