Solved

Can I update what a cbo box's row source is after it has been loaded in the form.

Posted on 2009-03-31
3
284 Views
Last Modified: 2012-05-06
Hello,

I have a cbo box on my form and it is being controlled by a qry that pulls certain items out of a table.  The user has to select one of the items from the list.  However the item may not be in the table, so I have a button that they can press and a new form opens and they can add it to the table.  When you do this, It is not able to be selected in the cbo box.  If you close the form and reopen it, it is then available.  I would like it to be available without exiting the form.  I am hoping that this is possible and fairly easy.

Thanks for your help.
0
Comment
Question by:ryanbass
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 300 total points
ID: 24030060

did you requery the combo box after adding the record?


see this link
Use NotInList Event to Add a Record to Combo Box
http://support.microsoft.com/?kbid=197526
0
 
LVL 28

Assisted Solution

by:TextReport
TextReport earned 200 total points
ID: 24030111
From teh command button after the form is open you can requery the combobox, however, this requery willbe ran while the form is open unless you open the form with acDialog set.

    DoCmd.OpenForm "MyForm", acNormal, , , , acDialog
    Me.cboMyCombo.Requery

Rather than using the command button you could use the NotInList event to tran when the item is not found, populate the underlying table and then get the NotInList to requery the combo.

Cheers, Andrew
0
 

Author Closing Comment

by:ryanbass
ID: 31564880
Thank you both.  
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question