Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How requery combobox when click command button on the form?

Posted on 2013-06-17
4
Medium Priority
?
487 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 48

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

610 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