• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 522
  • Last Modified:

How requery combobox when click command button on the form?

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
SteveL13
Asked:
SteveL13
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
it should be

Me.cboSelectBudget.requery
0
 
SteveL13Author Commented:
Yes.  I'm sorry.  That is what I have and it's not working.
0
 
Rey Obrero (Capricorn1)Commented:
maybe there is nothing to requery.. what is the rowsource of your combo box?
0
 
Dale FyeCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now