Parameters for reports

  • Thread starter Thread starter czello@sprynet.com
  • Start date Start date
C

czello@sprynet.com

Guest
I have a report that I am getting from a
UNION query. The query usually asks
for a parameter of "Country "

The report will not let me do this?

How can I get enter a report to ask for a parameter?
 
The easest way is to Copy the Union Query to the On open of the report and set it up this way.

Private Sub Form_Open()
Dim stParameter as String
Dim stSQL as String

stParameter = InputBox("Enter Parameter")
stSQL = "Select Field1 From Table1 Where Field3=" & stParameter & " Select Union All Field1 From Table2 Where Field3=" & stParameter

Me.RecordSource = stSQL

End Sub
 

Users who are viewing this thread

Back
Top Bottom