Simple web database comprising a main table of real estate sales data such as price data area address etc. [Properties] and a form [DetailedDisplay]. I use the built-in filters of the form to search and display data by various criteria. I want to move this to web when complete.



[TempVars]![RecordsToPrint] is created from my main form, it contains string data that other buttons change, but is usually something like "5 or 6 or 9". These are the IDs from records in my table 'Properties' that I want to show in a report. So far so good.

I want to use this TempVar to filter a Report. A button on my form drives this macro:

Open Report
Report Name Selected_Sales
Where Condition [ID]=[TempVars]![RecordsToPrint]
Window Mode Normal

Error is: "You either have an error in your expression or you have attempted to use an undeclared parameter, check the expression for errors or enter the parameter 'ID' in the Query Parameters dialog."

The next error window 'Macro Single Step' has the button Stop All Macros, and the Arguments are shown as: Selected_Sales, 5, , [ID]=[TempVars]![RecordsToPrint], Normal.
Error No 2950

Is this just a syntax issue, or is this simple procedure hard for some reason?
Is there a simpler way to create a list of records to print from filtered results in a form in a WEB Database (Access 2010)
(note: my question was simpler way, meaning not a more complex way). This should be a very basic operation and I am surprised I cannot sort it out by myself or find online help via searches.

Thanks so much