Hi all,
I'm facing an issue with Access that I haven't been able to find a solution for, despite hours of googling, so I hope someone here can help!
I've got a report - rptClientsByCou ntry - which is based on a query - qryClientsByCou ntry - that takes a parameter, myCountry, to filter the results. I need to be able to generate this report depending on the user's choice of country, preferably from a drop-down list.
Leaving aside for a minute the form part, I can't figure out how to pass a string to the report such that it accepts it as the parameter to the underlying query. Psuedo code would be:
sub command_click()
get current value of country drop down
set parameter myCountry on report
DoCmd.OpenRepor t "rptClientsByCo untry", acViewPreview
end sub
Can this be done? Or must I resort to setting the Where condition on the DoCmd.OpenRepor t?
Thanks in advance!
I'm facing an issue with Access that I haven't been able to find a solution for, despite hours of googling, so I hope someone here can help!
I've got a report - rptClientsByCou ntry - which is based on a query - qryClientsByCou ntry - that takes a parameter, myCountry, to filter the results. I need to be able to generate this report depending on the user's choice of country, preferably from a drop-down list.
Leaving aside for a minute the form part, I can't figure out how to pass a string to the report such that it accepts it as the parameter to the underlying query. Psuedo code would be:
sub command_click()
get current value of country drop down
set parameter myCountry on report
DoCmd.OpenRepor t "rptClientsByCo untry", acViewPreview
end sub
Can this be done? Or must I resort to setting the Where condition on the DoCmd.OpenRepor t?
Thanks in advance!
Comment