3rd Combo To Display Values Based on 2nd Combo - Both Tbls Are Different

Ashfaque

Search Beautiful Girls from your town for night
Local time
Tomorrow, 02:03
Joined
Sep 6, 2004
Messages
897
Hi,

I have 2 Combos boxes on a form named CboMainCriteria and CboCriteriaDetails.
Combo CboMainCriteria is based on T_Violations tbl wherein 3 field called ‘Crietria’ , ‘Reason’ and ‘Justification’. Whereas second combo CboCriteriaDetails is based on table tbl T_Violations
T_Violations containes many criteria such as LATES, ABSENT Etc…. and each criteria has different reasons…> 15 min, > 30 Min….and so on… as follows.

LATES >15 Min
LATES > 30 Min
LATES More than 2 hrs.
ABSENT
ABSENT
ABSENT

CboCriteriaDetails rowsource data is based on CboMainCriteria and are working well using Me!CboCriteriaDetails.RowSource = Me!CboCriteriaDetails.RowSource line in After Update event of CboMainCriteria.

At present when I am updating data in CboMainCriteria , my second combo CboCriteriaDetails is generating correct relevant values.…which is fine.

What I am looking for is : I have 3rd combo called “CboStartSent” which is based on other table called “T_WarnSent” wherein “Criteria” & “Reason” are same fields as mentioned in T_Violations

BUT Please note CboStartSent record source is different tbl “T_WarnSent” wherein “Criteria” is same field as mentioned in tbl “T_Violations”

I want my third combo “CboStartSent” to display only those records that is relevant with my second combo “CboCriteriaDetails”

This is not happening because for third Combo I used another table as said.

So how can I do that? Any help shall be appreciated.
 
ThE query in combo3,CboStartSent, has combo2 in the criteria.
Select field from table where field= forms!myForm!CboCriteriaDetails

But it you must refresh when user picks combo2

Code:
Sub CboCriteriaDetails_afterupdate
CboStartSent.requery
End sub
 
I have attached my db. I am concern with only colored Combo

When I update Crieteria combo...next combo "Reason" generates relevant field....both combo are based on one table source. But 3rd combo is generating lots of lines after updating second combo.

I need 3rd combo to generate only one line that is based on second combo (Reason..)
 

Attachments

I have attached my db. I am concern with only colored Combo

When I update Crieteria combo...next combo "Reason" generates relevant field....both combo are based on one table source. But 3rd combo is generating lots of lines after updating second combo.

I need 3rd combo to generate only one line that is based on second combo (Reason..)
Hi. See if this is what you mean.
 

Attachments

Yes.....Thank you. (y)
 

Users who are viewing this thread

Back
Top Bottom