Limit combo box selection based on another field value

S

Sei

Below is the current SQL statement for the combo-box [staffID]. However, I
want to limit it based on the value in the [entryDate] field.

But when the current record has an [entryDate] of 02/04/04, the [staffID]
combo box is blank. It does not display the staff Name whom left the
department on 01/09/05. Since 01/09/05 (endDate) is > 02/04/04 (entryDate),
shouldn't the combo box display the name?

[entryDate] is not part of the tbl_lookupStaff table. It's part of the
forms.frm_PIPSRecords (where the combo box for staffID is located).


SELECT tbl_lookupStaff.staffID, tbl_lookupStaff.staffName,
tbl_lookupStaff.staffEndDate, tbl_lookupStaff.currStaff
FROM tbl_lookupStaff
WHERE (((tbl_lookupStaff.staffEndDate)>[EntryDate])) OR
(((tbl_lookupStaff.currStaff)=Yes))
ORDER BY tbl_lookupStaff.staffName;


Any help is greatly appreciated. Thank you.
 
S

Sei

Please ignore this post. I found a solution by requerying the combobox thru
the form current event. Thx.
 

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

Top