Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010
    Posts
    13

    Unanswered: Updating a combo box in a form

    Hi,

    I have a combo box in a form linking to a table that lists the names of users.

    I have another form that allows me to add more users to the database, however, when I add a new user it doesn't automatically update the combo box.

    Is there any way I can update the combo box as soon as I add a new user without closing and reopening the form?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You have to requery the combo for the modifications to become visible:
    Code:
    Forms!<FormWithTheCombo>.<ComboName>.Requery
    You can place this code at the end of the procedure that adds users to the database.
    Have a nice day!

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you will probably need some error trapping around that code to allow for the situation where the form isn't open when a new user is added
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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