Solved

How requery combobox when click command button on the form?

Posted on 2013-06-17
4
414 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 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now