View Full Version : Parameters for reports


czello@sprynet.com
12-13-1999, 10:50 AM
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?

Travis
12-19-1999, 10:14 PM
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