[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How requery combobox when click command button on the form?

Posted on 2013-06-17
4
Medium Priority
?
495 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
  • 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 49

Accepted Solution

by:
Dale Fye earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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.
Suggested Courses

831 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