I'm kind of lost and frustrated with the dB! I asked for the dB you are working with and you post a dB with at least 20 field removed from table "SiteDetails".
This is not helpful.
Plus there are a lot of things that should be corrected. Having a PK field named "No" is problematic. "No" is a reserved word in Access (actually JET).
Why are there tables "MalaysiaEMEPMI" and "ThailandPTTSites"???
It is not real clear what/how you want to filter the report by: you want to pick a field (Engine, Power turbine, Gearbox...), then pick an engine type (RG211 C, Ruston, Avon,...) , then pick a site?
Then next report you want to pick a field (Gearbox), then pick a Gearbox type (Maag, Philadelphia Gear,....), then you may or may not pick a site?
What you want is not clear!
This will definitely not work! You have to explicitly declare a field and a value.
Code:
DoCmd.OpenReport "SiteDetails", acViewPreview, , "[Engine] or [Power Turbine] or [Driven Equipment] = '" & Me!ComboMainPartsD And Me.ComboMainPartsD2 & "'"
Code:
DoCmd.OpenReport "SiteDetails", acViewPreview, , "[Engine]='" & Me!ComboMainPartsD & "' Or [Power Turbine]='" & Me.ComboMainPartsD & "' Or [Driven Equipment]='" & Me.ComboMainPartsD & "'"
Lets give values to the combo boxes>
For "Engine", you select "RB211 C". This will return 3 records
For "Power Turbine", you select "RT56". This will return 12 records, but only 3 records also have Engine = "RB211 C".
For "Driven Equipment", you select "Ideal Electric". This will return 6 records.
So your report will have 18 records, but not one record will have all 3 criteria. This is because of the "OR" between the terms.
This is what the criteria looks like
Code:
SELECT SiteDetails.Engine, SiteDetails.[Power Turbine], SiteDetails.[Driven Equipment]
FROM SiteDetails
WHERE (((SiteDetails.Engine)="RB211 C")) OR (((SiteDetails.[Power Turbine])="RT56")) OR (((SiteDetails.[Driven Equipment])="Ideal Electric"));
If you changed the criteria to
Code:
DoCmd.OpenReport "SiteDetails", acViewPreview, , "[Engine]='" & Me!ComboMainPartsD & "' AND [Power Turbine]='" & Me.ComboMainPartsD & "' AND [Driven Equipment]='" & Me.ComboMainPartsD & "'"
with the same criteria as above, 0 records would be returned.
Here is the SQL
Code:
SELECT SiteDetails.Engine, SiteDetails.[Power Turbine], SiteDetails.[Driven Equipment]
FROM SiteDetails
WHERE (((SiteDetails.Engine)="RB211 C")) AND (((SiteDetails.[Power Turbine])="RT56")) AND (((SiteDetails.[Driven Equipment])="Ideal Electric"));
Do you see the difference between using "OR" and "AND"?