Can't get query result to "refresh" in form combobox (1 Viewer)

bpd

Registered User.
Local time
Yesterday, 19:31
Joined
Feb 16, 2005
Messages
15
This should be fairly simple, but it is driving me nuts trying to get it to work right. I feel like I'm chasing my tail.

Anyway, I have a query with three fields: "PersonnelID", "QualificationID", and "QualificationStatus". This is a query off of my large table for tracking qualifications; however, I am using a form with three combo-boxes for the same information. The first two combo-boxes (personnelID and QualificationID) are used to filter the query. This gives the result of one and ONLY one row in the query. A unique personnelID number, a qualificationID number and the qualification status of the record in question. I WANT to be able to automatically retreive the last field (qualificationStatus) from the query and display in the form (and then save in my new table - I know, shouldn't save calculations and such).

I have it working somewhat. I can select the first two combo-box fields and then when I click the third combobox for qualificationstatus, I only have one item in the dropdown menu and then I select it. So far, so good, but this only works for the first record that I am working on. If I do another record without closing the form first, the combobox selection for qualificationstatus still shows the previous entry. However, if I switch the form to design mode and then back to form mode, the combobox shows the correct value. I just can't seem to get the form to refresh prior to selecting the third combobox. I have tried "DoCmd.RepaintObject" after update on the second box and on focus for the the third box, but it still doesn't work unless I switch the views back and forth.

Any suggestions would be ever so gratefully appreciated...

Brian :eek:
 

bpd

Registered User.
Local time
Yesterday, 19:31
Joined
Feb 16, 2005
Messages
15
Nevermind. I got it with the Me.requery function. Works great now.

Brian
:D
 

Users who are viewing this thread

Top Bottom