Solved

How requery combobox when click command button on the form?

Posted on 2013-06-17
4
455 Views
Last Modified: 2013-06-18
I have a form that has a command button.  When the user clicks it I want the values in the query behind the combobox to be requeried and update a couple of afterupdate events from the combobox.

This isn't working:

Me.cboSelectBudget_requery
0
Comment
Question by:SteveL13
[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
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39253905
it should be

Me.cboSelectBudget.requery
0
 

Author Comment

by:SteveL13
ID: 39253925
Yes.  I'm sorry.  That is what I have and it's not working.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39254077
maybe there is nothing to requery.. what is the rowsource of your combo box?
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39254125
As capricorn1 indicated,

Me.cboSelectBudget.requery

will requery the combo box, but I will not set a value or call the after update event, so if you have a default value you want to use (the first item possibly), you could try:

cboSelectBudget = me.cboSelectBudget.ItemData(0)
Call cboSelectBudget_AfterUpdate
0

Featured Post

Independent Software Vendors: 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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

733 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