Snowflake68
Registered User.
- Local time
- Today, 00:31
- Joined
- May 28, 2014
- Messages
- 464
Hi have a combo box on a datasheet that is bound to a table. The list is created via a query to a look up table. The user selects a size from the combo box for record 1 then moves down to record 2 to select the size for the next record.
The issue is that I am trying to limit the list to exclude the size that has already been selected on record one (or any of the other records in the dataset)
I did find a way to do this by creating a query to exclude the values that have already been selected for a previous record which works until I close the form and reopen it. When I close the form and then try to reselect from any of the combos (not just the one with the exclude from list query) I am then unable to move out of the record. I cannot even change back to the design of the form, the only thing I can do is close the form, this produces the error, "You cant save the record at this time.
The SQL for the query to the combo box is
This is the query that the above query uses
Is there any other way of excluding values from the list where the value has already been selected in the same dataset?
The issue is that I am trying to limit the list to exclude the size that has already been selected on record one (or any of the other records in the dataset)
I did find a way to do this by creating a query to exclude the values that have already been selected for a previous record which works until I close the form and reopen it. When I close the form and then try to reselect from any of the combos (not just the one with the exclude from list query) I am then unable to move out of the record. I cannot even change back to the design of the form, the only thing I can do is close the form, this produces the error, "You cant save the record at this time.
The SQL for the query to the combo box is
Code:
SELECT qry_Conv_SizeOutgoing.OutgoingSize, qry_Conv_SizeOutgoing.Description, qry_Conv_SizeOutgoing.IncomingSize, qry_Conv_SizeOutgoing.SizeCategory, qry_Conv_SizeOutgoing.SizeRange, qry_Conv_SizeOutgoing.UpDownSize
FROM qry_Conv_SizeOutgoing
WHERE (((Exists (SELECT NULL FROM qry_Conv_OutgoingSizesSelected WHERE qry_Conv_OutgoingSizesSelected.SelectedSize = qry_Conv_SizeOutgoing.OutGoingSize))=False));
This is the query that the above query uses
Code:
SELECT tbl_ConvSizesOutIn.OutgoingSize, tbl_ConvSizesOutIn.IncomingSize, tbl_ConvSizesOutIn.SizeCategory, tbl_ConvSizesOutIn.SizeRange, tbl_ConvSizesOutIn.UpDownSize
FROM tbl_ConvSizesOutIn
GROUP BY tbl_ConvSizesOutIn.OutgoingSize, tbl_ConvSizesOutIn.IncomingSize, tbl_ConvSizesOutIn.SizeCategory, tbl_ConvSizesOutIn.SizeRange, tbl_ConvSizesOutIn.UpDownSize;
Is there any other way of excluding values from the list where the value has already been selected in the same dataset?