Parameters for reports (1 Viewer)

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?
 

Travis

Registered User.
Local time
Today, 02:32
Joined
Dec 17, 1999
Messages
1,332
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

Top Bottom