Multiple and all parameter query

dark11984

Registered User.
Local time
Tomorrow, 05:54
Joined
Mar 3, 2008
Messages
129
Hi I have a union query with a parameter box used to select the branch (POP) I want to query. I have no problems querying one branch e.g "A". But is there a way i can query "A" & "B" or "A" "B" & "C" or "All"?

I have searched everywhere but cannot find a way to do this. Any help would be much appreciated, below is my SQL statement.

Code:
SELECT TblPToday.[Pop Code], TblPToday.[Prod Cd], TblPToday.Qty, TblPToday.[Qty Outstd], TblPToday.[Auth By], TblPToday.[Req Dt], TblPToday.Vendor, TblPToday.[Ord Ln Fr] AS [Sales Order], TblPToday.[Ord Ln To] AS [P/O], TblPToday.[Stor Typ] AS [Stores Type]
FROM TblPToday
WHERE [Vendor] <> [POP Code] and  ((([Pop Code])=[Enter POP Code])) 
UNION SELECT TblPHistory.[POP Code], TblPHistory.[Prod Cd], TblPHistory.Qty, TblPHistory.[Qty Outstd], TblPHistory.[Auth By], TblPHistory.[Req Dt], TblPHistory.Vendor, TblPHistory.[Ord Ln Fr] AS [Sales Order], TblPHistory.[Ord Ln To] AS [P/O], TblPHistory.[Stor Typ] AS [Stores Type]
FROM TblPHistory
WHERE [Vendor] <> [POP Code] and  ((([Pop Code])=[Enter POP Code]))
ORDER BY [Req Dt], [Vendor], [P/O];
 
Download the sample from the link given below it has a sample query just like you want

Click Here
 

Users who are viewing this thread

Back
Top Bottom