Updating Combo Box Info

  • Thread starter Thread starter SamDev
  • Start date Start date
S

SamDev

I am using Access 2002. I have added a command button on a form that
includes invoicing, product info etc. that for these purposes I will call
Form 1. The commond button opens another form (Form 2) where new product
names etc can be added.

The issue I'm having is as follows:

Form 1 has a field that is a combo box and is linked to table that is the
destination for data input (product names) into Form 2.

In Form 1 for a single record, there is the ability to add many products.
Clicking the combo box drop-down menu and selecting a product. For example,
when a single client purchases mult-products.

What happens when I click on the command button in Form 1 to open Form 2 so
I can add more products - it will update fine only IF I'm on the first line
of entry on Form 1. If I'm on the second line of entry on Form 1 and click
the command button to open Form 2 and add new entry, when I return to Form 1
the new entry is not listed in the combo box.

Any suggestions.....

Much Thanks!
 
sorry but I don't know how do what you are suggesting?
so more help would be great - thank you!!
 
Hi Sam, I recently had a similar problem. What you need to do is add a line
of code to 'requery' the combo box. How you do this is with the requery
function, in this case form1.requery.

However, how you call this is another matter. If Form 2 is closed after you
update it, and form 2 is ONLY used to update that combo box, putting this
code into Form 2 should work
Private Sub Form2_Close()

Forms!form1!your_combo.requery

end sub

Hopefully that does the trick, but I'm a newbie too so it might be worng :(
 
Back
Top