Solved

refresh results in combo box

Posted on 2014-01-01
3
792 Views
Last Modified: 2014-01-01
I have a combo box on a form with a query as it recordsource, in this case addresses.  The user requested a button on the form to add a new address that is not in the combo box.

Easy enough, I put on the button, took them to the form where they could add a new option.  The new option was added but when They return to the form the new option doesn't show in the dropdown.

How do I refresh the combo box to pick up the just added entry.

The recordsource of the combo box is a query.

I am opening the form to add an address with the acDialog option do I return to my program right after the call.

Right now I have me.addressid.requery directly after the call to the address form.

How can this be accomplished?
0
Comment
Question by:mlcktmguy
[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
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 250 total points
ID: 39750672
You can put this after the call to open the address form in the command button, or in your form OnActivate event procedure.

MyComboboxName.requery

... where "MyComboBoxName" is the name of your combo box control.
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 39750726
That's what I'm doing and it doesn't show up.  Yet when I exit the form and come back in the new entry is in the dropdown.
Here is my code:
DoCmd.OpenForm "frmProperty_Addresses_Sub", , , , , acDialog, Nz(Me.PropertyID, 0)
Me.InterestedPartyID.Requery

Open in new window

0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 39750739
You get the points.  Your answer is correct.  There was some very specific code in the module to repopulate the table that  is basis for that combo box.  So even though I had the requery it didn't matter. Seeing your answer made me look further though.  Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…

740 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