Solved

How requery combobox when click command button on the form?

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

937 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

9 Experts available now in Live!

Get 1:1 Help Now