Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

access refresh combo box

I thought i could do this but the knack has escaped me.

OK, field on form also features as one of the fields returned in combo box which combo box selects the records in the form.

However when I change the field (its a lookup field) and I would like the combo box to immediately reflect that change when entered.

Its probably an after update/current form event/refresh something or other but Im not doing what I should be doing.

So help please.
0
topUKlawyer
Asked:
topUKlawyer
1 Solution
 
Rey Obrero (Capricorn1)Commented:
use the afterupdate event to requery the combo box..
0
 
KCTSCommented:
Agreed - as the last instruction in the code add

me.ComboBoxName.requery

(where ComboBoxName is the name of your combo box)
0
 
topUKlawyerAuthor Commented:
Yes but the after event of which control ?
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
Rey Obrero (Capricorn1)Commented:
isn't this an obvious thing, you posted
<However when I change the field (its a lookup field) and I would like the combo box to immediately reflect that change when entered.>

what is that "field" ?
0
 
clarkscottCommented:
Sometimes, my combobox source table contains more info than shown in the combo.  In these cases, I create a bound "list" form to the combo source table with the ability to add records.  Then, from the DOUBLE-CLICK event of the combo, I open this form, in dialog mode, let the user add the required record, then - when the form is closed, the code requeries the combo box to include the newest record... me.cboYourBox. requery

Scott C
0
 
Rey Obrero (Capricorn1)Commented:
fwiw - you can refer to this link
Use NotInList Event to Add a Record to Combo Box
http://support.microsoft.com/?kbid=197526
0
 
topUKlawyerAuthor Commented:
perhaps my question was not posted as accurately as you would wish
I dont know.

I have sorted it out anyway,

in the text box there is a lookup field.

The adjacent combo also picks up that field  when changed but only when the form is closed and reopened.
i wanted to reflect that change as soon as it happened.

putting a combo box requery in the after update event of the text box only worked when the form was closed and opened again-not what i needed.

however it did work when i put me. refresh in the text box after update event just before
the combo requery.
this alerted the requery to the fact that the text box contents had changed
0
 
Rey Obrero (Capricorn1)Commented:
upload a copy of the db
0
 
Rey Obrero (Capricorn1)Commented:
mind posting the solution..
0
 
topUKlawyerAuthor Commented:
stumblred on solution by chance
0

Featured Post

Independent Software Vendors: 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!

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