Hi,
I have a report that displays all results when opened.
IF I put [forms]![purchasersinv]![vendsearch]
in the 'ID' criteria then it will open the report based
on a combo in a form.
But I want the report to open all results by default and
only to show specific results if the combo on a form is used.
is it possible to open a report specifyng criteria for the reports query from the onclick event of button.
At present I have :
Dim stDocName As String
stDocName = "vendor invoice"
stLinkCriteria = "[reports]![purchasers invoice]![VendorID]=" & Me![vendsearch]
DoCmd.OpenReport stDocName, acPreview
this returns error, but am i on the right track?
I have a report that displays all results when opened.
IF I put [forms]![purchasersinv]![vendsearch]
in the 'ID' criteria then it will open the report based
on a combo in a form.
But I want the report to open all results by default and
only to show specific results if the combo on a form is used.
is it possible to open a report specifyng criteria for the reports query from the onclick event of button.
At present I have :
Dim stDocName As String
stDocName = "vendor invoice"
stLinkCriteria = "[reports]![purchasers invoice]![VendorID]=" & Me![vendsearch]
DoCmd.OpenReport stDocName, acPreview
this returns error, but am i on the right track?