Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have several forms made for my database and would like to update a combo box to include new data I put into the table. My question is, since it is a combo box, how do I get values to show up like a lookup wizard? I put all the new information into a table called doctors...When I go to make a new record the doctors box doesn't have any of the values I put into the table. When I went to see what the source was linking to the combo box and it said the row source is: SELECT Physician.Physician FROM Physician WHERE (((Physician.Loc)=[Forms]![Create New Record CPI]![Location Combo])) ORDER BY Physician.Physician;....Am I looking in the wrong area or is there someway to update this source??
 
Hi,

I have several forms made for my database and would like to update a combo box to include new data I put into the table. My question is, since it is a combo box, how do I get values to show up like a lookup wizard? I put all the new information into a table called doctors...When I go to make a new record the doctors box doesn't have any of the values I put into the table. When I went to see what the source was linking to the combo box and it said the row source is: SELECT Physician.Physician FROM Physician WHERE (((Physician.Loc)=[Forms]![Create New Record CPI]![Location Combo])) ORDER BY Physician.Physician;....Am I looking in the wrong area or is there someway to update this source??

Table Lookups are generally frowned upon by serious developers (see
http://www.mvps.org/access/lookupfields.htm). This is one of the
reasons for that displeasure - since table datasheets don't have any
usable events, you can't Requery the combo box!

On a Form, however, it's easy to do so. Just put VBA code or a Macro
in the afterupdate event of the form you're using to update the
Doctors table to requery the combo box on the Form.
 
Back
Top