N
Neil
Hello,
I have the following query:
SELECT qryBuilderAvailableOptions.lngMachineID,
qryBuilderAvailableOptions.lngDescriptionID,
qryBuilderAvailableOptions.lngCatagoryID,
qryBuilderAvailableOptions.blnIsRequired, qryBuilderAvailableOptions.[Option
No], qryBuilderAvailableOptions.strName,
qryBuilderAvailableOptions.strDescription,
qryBuilderAvailableOptions.dblPrice,
qryBuilderAvailableOptions.blnDeductDiscount
FROM qryBuilderAvailableOptions
WHERE (((qryBuilderAvailableOptions.lngMachineID) In (SELECT
tblOptions.lngMachineID FROM tblOptions)) AND
((qryBuilderAvailableOptions.lngDescriptionID) In (SELECT
tblOptions.lngDescriptionID FROM tblOptions)))
ORDER BY qryBuilderAvailableOptions.[Option No];
The qryBuilderAvailableOptions is a query which pulls together all available
items for a particular machine. tblOptions holds the primary key
(lngMachineID and lngDescriptionID) of all options selected by the user. An
example of the options table could look like this:
lngMachineID lngDescriptionID
2 10
2 15
2 12
2 9
2 2
etc...
the query above is the record source for my options form. If the table
looked like it does above, the option form would desplay 5 records
correctly.
My problem is when there are multiple options selected. If the options table
looked like this:
lngMachineID lngDescriptionID
2 10
2 15
2 12
2 9
2 2
2 15
2 2
2 9
the form would still only display 5 records (as expected as specified in my
In statements in the query).
How can I change the query to return duplicated rows as well so that all 8
records would be displayed in my options form?
TIA,
Neil.
I have the following query:
SELECT qryBuilderAvailableOptions.lngMachineID,
qryBuilderAvailableOptions.lngDescriptionID,
qryBuilderAvailableOptions.lngCatagoryID,
qryBuilderAvailableOptions.blnIsRequired, qryBuilderAvailableOptions.[Option
No], qryBuilderAvailableOptions.strName,
qryBuilderAvailableOptions.strDescription,
qryBuilderAvailableOptions.dblPrice,
qryBuilderAvailableOptions.blnDeductDiscount
FROM qryBuilderAvailableOptions
WHERE (((qryBuilderAvailableOptions.lngMachineID) In (SELECT
tblOptions.lngMachineID FROM tblOptions)) AND
((qryBuilderAvailableOptions.lngDescriptionID) In (SELECT
tblOptions.lngDescriptionID FROM tblOptions)))
ORDER BY qryBuilderAvailableOptions.[Option No];
The qryBuilderAvailableOptions is a query which pulls together all available
items for a particular machine. tblOptions holds the primary key
(lngMachineID and lngDescriptionID) of all options selected by the user. An
example of the options table could look like this:
lngMachineID lngDescriptionID
2 10
2 15
2 12
2 9
2 2
etc...
the query above is the record source for my options form. If the table
looked like it does above, the option form would desplay 5 records
correctly.
My problem is when there are multiple options selected. If the options table
looked like this:
lngMachineID lngDescriptionID
2 10
2 15
2 12
2 9
2 2
2 15
2 2
2 9
the form would still only display 5 records (as expected as specified in my
In statements in the query).
How can I change the query to return duplicated rows as well so that all 8
records would be displayed in my options form?
TIA,
Neil.