Display Criteria Selected by User

S

S Jackson

My Form: [frmQuickListOpen] opens after the user navigates a series of
dialog boxes. First dialog box allows the user to view all data w/o
selecting criteria [Optn1], or to view data by the field "Region" [Optn2],
or by field "Attny" [Optn3]. If the user selects Optn2, a new dialog box
opens that allows the user to make a multi selection from a list box (user
selects which Regions) and frmQuickListOpen opens displaying all data from
the Regions selected. If the user selects Optn3, a new dialog box opens, .
.. . ., etc.

Question No. 1:
What I want frmQuickListOpen to do is to display in one text box
[allRegions] a list of the Regions included in the data requested by the
user or displayed in frmQuickListOpen. (I am not sure if the above
paragraph is relevant other than the user can use Region as a criteria.).

Question No.2:
Then, I want the user to print a report [rptQuickList], but I want it to
print only the information displayed in frmQuickListOpen. I am assuming the
code will have to look something like this?

strSQL = "SELECT tblCaseInfo.Region, tblCaseInfo.DHSNo, " _
& "tblCaseInfo.Action " _
& "FROM tblCaseInfo " _
& "WHERE tblCaseInfo.Region = " & Me.allRegions & " " _
& "ORDER by tblCaseInfo.CaseName; "

DoCmd.OpenReport stDocName, acViewPreview, , strSQL

Help! I'm lost.
S. Jackson
 
S

S. Jackson

After I thought about this a little more, I realized that I am way off
regarding Question 2. The text box [allRegions] have nothing to do with it.

What I want is for the report to print the information that the form is
displaying. Hence I want the report's sql to equal the form's sql. How do
I do this?

TIS
S. Jackson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top