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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top