willr
10-15-2009, 08:50 AM
Hi there,
If someone could help with this it would be greatly appreciated. I'm using a form (Main_Report_1) with two combo boxes each linked to their respective tables (tbl_System_Id.System_id and tbl_Protection_Type.Protection_Type) the selection of the data or null in either combo box will filter the data out in tbl_EX_register to what I want.
The SQL code is:
FROM tbl_System_Id INNER JOIN (tbl_Protection_Type INNER JOIN tbl_EX_register ON tbl_Protection_Type.Protection_Type=tbl_EX_registe r.[Protection Concept ex-]) ON tbl_System_Id.System_id=tbl_EX_register.[System No]
WHERE (((tbl_System_Id.System_id)=Forms!Main_Report_1!cb oSystem_Id) And ((tbl_Protection_Type.Protection_Type)=Forms!Main_ Report_1!cboProtection_Type)) Or (((tbl_Protection_Type.Protection_Type)=Forms!Main _Report_1!cboProtection_Type) And ((IsNull(Forms!Main_Report_1!cboSystem_Id))<>False)) Or (((tbl_System_Id.System_id)=Forms!Main_Report_1!cb oSystem_Id) And ((IsNull(Forms!Main_Report_1!cboProtection_Type))<>False)) Or (((IsNull(Forms!Main_Report_1!cboSystem_Id))<>False) And ((IsNull(Forms!Main_Report_1!cboProtection_Type))<>False));
This works perfectly. I now want to add another combo box (cboStatus.Status) linked to a third table (tbl_Status) which will work with the two combo's I already have to filter out where the filtered dat occurs.
Thanks in advance.
If someone could help with this it would be greatly appreciated. I'm using a form (Main_Report_1) with two combo boxes each linked to their respective tables (tbl_System_Id.System_id and tbl_Protection_Type.Protection_Type) the selection of the data or null in either combo box will filter the data out in tbl_EX_register to what I want.
The SQL code is:
FROM tbl_System_Id INNER JOIN (tbl_Protection_Type INNER JOIN tbl_EX_register ON tbl_Protection_Type.Protection_Type=tbl_EX_registe r.[Protection Concept ex-]) ON tbl_System_Id.System_id=tbl_EX_register.[System No]
WHERE (((tbl_System_Id.System_id)=Forms!Main_Report_1!cb oSystem_Id) And ((tbl_Protection_Type.Protection_Type)=Forms!Main_ Report_1!cboProtection_Type)) Or (((tbl_Protection_Type.Protection_Type)=Forms!Main _Report_1!cboProtection_Type) And ((IsNull(Forms!Main_Report_1!cboSystem_Id))<>False)) Or (((tbl_System_Id.System_id)=Forms!Main_Report_1!cb oSystem_Id) And ((IsNull(Forms!Main_Report_1!cboProtection_Type))<>False)) Or (((IsNull(Forms!Main_Report_1!cboSystem_Id))<>False) And ((IsNull(Forms!Main_Report_1!cboProtection_Type))<>False));
This works perfectly. I now want to add another combo box (cboStatus.Status) linked to a third table (tbl_Status) which will work with the two combo's I already have to filter out where the filtered dat occurs.
Thanks in advance.