how to use VB string to populate a report
Posted on 2011-02-18
I am down to my last command button function and my form will be complete :)
I have a command button that filters a sub_form based on the value from a combo box. The value in VB for that "Private Sub" is "str_FULL_SQLString_Single".
I have also created a report from the sub form.
I am trying to program a button reading:
---docmd.openreport "rpt_Print_Single",acviewpreview, wherecondition:=str_full_string_single
But when the report comes up, it is not using the filter setup in the string.
Private Sub cmd_Preview_Report_Click()
DoCmd.OpenReport "rpt_test_print", acViewPreview, , wherecondition:=str_FULL_SQLString_Single
My thinking is that it's not using the string because the string is created under a different sub...