I built a query and use it in a report. The query has one parameter that must be satified at run time which is [Year_Id]. Rather than user type a value, I need to provide a value based on certain calculation which I intend to do when the report is open. I have the following code:
[CODE=vb]
Private Sub Report_Open(Can cel As Integer)
MsgBox "Now In Report_Open Sub"
'Do the calculation here
'Provide a value for Year_Id of the query prompt
End Sub[/CODE]
What I need to know is how can I reference the [Year_Id] of the query and give it a value.
Greatly appreciate your help in advance.
Saleem
[CODE=vb]
Private Sub Report_Open(Can cel As Integer)
MsgBox "Now In Report_Open Sub"
'Do the calculation here
'Provide a value for Year_Id of the query prompt
End Sub[/CODE]
What I need to know is how can I reference the [Year_Id] of the query and give it a value.
Greatly appreciate your help in advance.
Saleem
Comment