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=?)
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=?)