automatic update

  • Thread starter Thread starter Bhagya
  • Start date Start date
B

Bhagya

Hi,

I have two tables - vendor and deals

I have two forms with the same names. On the "deals" form
there is a combo box, which shows the vendor name (from
the vendor table)

My problem is that after I enter the vendor information in
the vendor form and open the deals form - the combo box
does not show me the latest information

Is there any way I can automate this - i.e have my combo
box show the latest vendor information.

Any help would be appreciated

Thanks
Bhagya
 
ComboBoxes populate when the form loads. If you're adding
a new Vendor while the Deals form is open, you will need
to requery the ComboBox to get the new data. However, it
sounds like the form doesn't open until after you add the
new vendor so it should already be there.

I can see two possible reasons it isn't:

1> the process and code for switching forms.
If the Vendor form is tied to the Vendor table then the
new vendor is not added to the table until the record is
saved (by you moving to the next record). If you enter a
new Vendor and then click the CommandButton before going
to a new record and if your code opens the Deals form
before closing the Vendors form then the new Vendor will
not appear in your ComboBox.

This is easily fixed by having your process go to a new
record before changing forms.

2> the source query for the ComboBox doesn't pull all the
data it should.

Hope this helps!

Howard Brody
 
Thanks Howard,

It works if I close the vendor form and open the deals
form. But if two people are using the same database then I
would want the deals combobox to show the latest info.

I donot know how to code a requery and also where exactly
I associate the requery i.e is it within the vendor form
or the deals form and also what event.

I appreciate any help.

Thanks
Bhagya
 
Back
Top