I've looked at this to the point of brain-death. Perhaps someone can help me through the fog.
I have a working parameter query that starts off like this:
PARAMETERS [Enter mm/yyyy] Text, [Enter SvcCode] Text;
SELECT …..
WHERE ((tblClientBilling.strMoYr)=[Enter mm/yyyy]) AND (tblClientBilling.strSvcCode)=[Enter SvcCode])
…please disregard mismatched parenthesis, etc., I've chopped this down to the essentials and left out about 30 lines of code.
The virtually identical query, when called from a form that includes control cboMoYr, looks like this:
PARAMETERS [Enter SvcCode] Text;
SELECT …..
WHERE ((tblClientBilling.strMoYr)=[Forms]![frmPrintBillingRpts]![cboMoYr]) AND ((tblClientBilling.strSvcCode)=[Enter SvcCode])
Both queries work properly in their individual contexts.
The problem I'm looking to resolve is that some users will use the print form (frmPrintBillingRpts), to call the report, while others will attempt to call the report directly from the database window.
What I need is, if the report is opened from the database window, dialog boxes asking for both [Enter mm/yyyy] and [Enter SvcCode], but if called from form frmPrintBillingReports, the mm/yyyy coming from the form's cboMoYr and only the [Enter SvcCode] dialog to appear.
Hopefully, the error of my ways will jump out and you'll say "…dumbass, here's all you have to do!" Thanks for your assistance.
Bob
I have a working parameter query that starts off like this:
PARAMETERS [Enter mm/yyyy] Text, [Enter SvcCode] Text;
SELECT …..
WHERE ((tblClientBilling.strMoYr)=[Enter mm/yyyy]) AND (tblClientBilling.strSvcCode)=[Enter SvcCode])
…please disregard mismatched parenthesis, etc., I've chopped this down to the essentials and left out about 30 lines of code.
The virtually identical query, when called from a form that includes control cboMoYr, looks like this:
PARAMETERS [Enter SvcCode] Text;
SELECT …..
WHERE ((tblClientBilling.strMoYr)=[Forms]![frmPrintBillingRpts]![cboMoYr]) AND ((tblClientBilling.strSvcCode)=[Enter SvcCode])
Both queries work properly in their individual contexts.
The problem I'm looking to resolve is that some users will use the print form (frmPrintBillingRpts), to call the report, while others will attempt to call the report directly from the database window.
What I need is, if the report is opened from the database window, dialog boxes asking for both [Enter mm/yyyy] and [Enter SvcCode], but if called from form frmPrintBillingReports, the mm/yyyy coming from the form's cboMoYr and only the [Enter SvcCode] dialog to appear.
Hopefully, the error of my ways will jump out and you'll say "…dumbass, here's all you have to do!" Thanks for your assistance.
Bob