Problem updating a combo Box

  • Thread starter Thread starter Harry.PharmTouch
  • Start date Start date
H

Harry.PharmTouch

I have a couple of subforms : (Diagnoses, ActiveOrders) on a main
form (Residents) and I wish to be able to associate a diagnosis with a
particular order.

The diagnosis field on the ActiveOrders subform has the following
reference.

SELECT Diagnosis.DiagDescription, Diagnosis.DiagResident
FROM Diagnosis
WHERE (((Diagnosis.DiagResident) Like [Forms]![Residents]![PtName]));


The problem is that when I go to the next resident from the main form,
the old resident's diagnosis list still appears in the combo box drop
list until I close the main form and re-open it. I've tried refreshing
the screen but this does not seem to help consistently.

Do I need to reference a different field or do some other type of
requery? If so any ideas what


Harry Allbright
PharmTouch
 
The problem is that when I go to the next resident from the main form,
the old resident's diagnosis list still appears in the combo box drop
list until I close the main form and re-open it. I've tried refreshing
the screen but this does not seem to help consistently.

Requery the combo box in both the Form's Current event and the AfterUpdate
event of the PTName control.

John W. Vinson [MVP]
 
Back
Top