update combo box with each entry

  • Thread starter Thread starter JRLH
  • Start date Start date
J

JRLH

I am trying to set a combo box so that it updates as I add
each new record. For example, the current box I'm working
on involves a list of potentially all of the hospitals in
the state, and each time I have a patient record from a
new hospital, I would like the combo box to be updated so
the name of the new hospital can be selected from the
combo box list later on.

Jennifer
 
Hi Jennifer,

To do this, use a query as the Row Source for the combo
box. Just set up the query to query the unique list of
hospitals from your database. That way, every time one
is added it will automatically show up in the list in the
future.

HTH

-Ted Allen
 
I was able to get it to work, but the combo box is
allowing duplicates from the pull-down menu. For example:

Cook County Hospital
Cook County Hospital
Mayo Clinic
Mayo Clinic

The table that the query is based on is indexed to prevent
duplicates. Any suggestions?
 
Hi Jennifer,

You can prevent duplicates from being listed by changing
the query "Unique Values" property to yes.

HTH, Ted Allen
 
Back
Top