Row Source

  • 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 physicians...When I go to make a new record the physician 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?
 
Darci said:
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 physicians...When I
go to make a new record the physician 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??

You can certainly change the row source, but I'm not sure exactly what
you're after. The row source query you quoted only includes Physicians
for whom the Loc field matches what is currently selected in the
"Location Combo" control on form "Create New Record CPI". Is that what
you intended?

If you open this form and select a location (and presumably requery the
physician combo box after selecting the location), and *then* add more
physicians to the Physicians table, the new physicians won't show up in
the combo -- even if they match the selected location -- until you
requery the combo box. So you have to have code executed after you add
the new records, that does something like this:

[Forms]![Create New Record CPI]![Physician Combo].Requery

That is assuming that the name of the combo to be requeried is
"Physician Combo", and that it is on the (open) form named "Create New
Record CPI".
 
Back
Top