Access 2010 VBA: Modify the recordset that feeds a report

0

I have a report to which I want to change the recordset that feeds it from VBA, so from the form of the button that feeds it, I select a query called OTaller and I add it to the records that have certain Id

filtro = "SELECT OTaller.*" filtro = filtro & " FROM OTaller" filtro = filtro & " WHERE Id=" & Me!Id.Value

Then, I open the report. So:

DoCmd.OpenReport "ordentallerSobre", acViewPreview, , filtro

The result is an error. What I would like is that the report will only show the OTaller records that have that Id, but nothing else. Any ideas?

    
asked by AccOUCH 28.09.2018 в 14:04
source

0 answers