Not sure the title explains what I need. I usually use a query and create a report off of that query and things work great. As my knowledge of access and vba broadens im seeing a whole new horizon on whats possible.
I have a report that has a column with three possible results (On premise, Off Premise, Both). I created a report that shows all three and I am wondering if I can tell the report to print only on premise both and then off premise both. I can easily do this in a query but I like to expand my knowledge
Edit: I tried google and maybe my search criteria is wrong but all I see is how to show certain columns from a table/query...which i know how to do
thank you, I like this idea. I put the code in with error handling and its telling me object required and prints a blank report
Private Sub cmdOnPremisePrint_Click()
On Error GoTo Err_cmdOnPremisePrint_click
'open the report showing only on premise and both
DoCmd.OpenReport "rptcomboreportqry", , , "rptcomboreportqry.Premise" = "On Premise" Or "rptcomboreportqry.Premise" = "Both"
'Print the Report
I think I found the flaw with this method. The reports are exactly the same except for that one field (same being same look same title etc etc). After printing both you have no idea which report is which without looking at the data (not a huge deal for this report).
I really like the way this is set up. IMO its cleaner than creating two additional queries and reports. Does anyone know a way I could put something with the title of the report to differentiate the two? Maybe a control box with a me. command?