Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting All from Combo Box

Status
Not open for further replies.

cneill

Instructor
Mar 18, 2003
210
GB
Hi,

I have the following query as the row source of the Combo Box
SELECT tblElectricalDeliveryCompany.DeliveryCompanyID, tblElectricalDeliveryCompany.OutPutFileRef, tblElectricalDeliveryCompany.OutPutFileRefOrder
FROM tblElectricalDeliveryCompany
WHERE (((tblElectricalDeliveryCompany.OutPutFileRefOrder) Is Not Null))
ORDER BY tblElectricalDeliveryCompany.OutPutFileRefOrder;

I use the DeliveryCompanyID as the bound field for the filter to run an export file.

I need to add an ALL option I have tried the following
SELECT "*" AS DeliveryCompanyID, "ALL" AS OutPutFileRef, 0 AS SortOrder FROM QryOutPutFileRef UNION SELECT DeliveryCompanyID, OutPutFileRef, 1 FROM QryOutPutFileRef
ORDER BY SortOrder, OutPutFileRefOrder;

This Adds the All option but adds an * in the DeliveryCompanyID so I get a data type mismatch

any thoughts on where I am going wrong?
 
Have you tried to use the LIKE operator in your SQL WHERE clause ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV,

Not sure how to do that, can you guide me?

the end result I am trying to get is that the All will have a wild card in it so that it can be used in the filter of the other query to select all the records

Thanks
cneill
 
Hi PHV,

Sorted it, just realised where the Like should go, works a treat

Thanks
CNEILL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top