Excel DB Query Parameter for all values

N

Newbrier

I my excel file connecting to access via Microsoft Query which is
pulling a table. I have set a filter on a field to get only the item
results I need (one of about 30) and my excel file builds a pretty
report from the data. It works well. Now I need to be able to return
all of the values but I cannot pass a null filter to my query to
return all of the records. I have a drop down in my excel file that
the user can select the filter they want. Right now I have only one
item. I want them to be able to select "All" and the query returns
all records. Also, I'm hoping there is a way to do this without
needing to redo everything in VBA.

My SQL Statement from MS Query:

SELECT tbl_Output_Results.LOB, tbl_Output_Results.SUMMARY_LINE_FLASH,
tbl_Output_Results.ACCOUNT, tbl_Output_Results.SUMMARY_ACCOUNT_NAME,
tbl_Output_Results.DESCRIPTION, tbl_Output_Results.`Jan08 Act`,
tbl_Output_Results.`Feb08 Act`, tbl_Output_Results.`Mar08 Act`,
tbl_Output_Results.`Apr08 Act`, tbl_Output_Results.`May08 Act`,
tbl_Output_Results.`Jun08 Act`, tbl_Output_Results.`Jan08 Plan`,
tbl_Output_Results.`Feb08 Plan`, tbl_Output_Results.`Mar08 Plan`,
tbl_Output_Results.`Apr08 Plan`, tbl_Output_Results.`May08 Plan`,
tbl_Output_Results.`Jun08 Plan`
FROM tbl_Output_Results tbl_Output_Results
WHERE (tbl_Output_Results.LOB=?)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top