I am selecting the year from a combo box. After the year is selected, the user will click on a command button to view a report. Below is my code that performs the action required. However, once the command button is clicked, I receive a pop up box that states "ENTER PARAMETER VALUE" for cboYear.Value
why does it do this and how do I work around it?
Code:
Dim stDocName As String
Dim SelectedYear As Integer
SelectedYear = cboYear.Value
MsgBox (SelectedYear)
stDocName = "Overall Report"
DoCmd.OpenReport stDocName, acPreview, , "Year = cboYear.Value"
Thanks,
Tron