I have a form with 3 parameters. These parameters dictate what to display on a report. The user will choose their name from the Employee combo drop down box and then choose a date range for the report. I have the following code in a command button to open the report.
DoCmd.OpenReport "EmpBalSheet1", acViewPreview, , "[VisitDate] Between #" & Me.Text2 & "# And #" & Me.Text4 & "#"
This works perfectly for the dates, but I am at a loss as to how to incorporate the Employee parameter in the code as this code below does not work
DoCmd.OpenReport "EmpBalSheet1", acViewPreview, , "[EmployeeName]" & "[VisitDate] Between #" & Me.Text2 & "# And #" & Me.Text4 & "#"
I know I am missing something, but don't know what. Any help will be greatly appreciated!
Thank you to all the great programmers that help out there!
DoCmd.OpenReport "EmpBalSheet1", acViewPreview, , "[VisitDate] Between #" & Me.Text2 & "# And #" & Me.Text4 & "#"
This works perfectly for the dates, but I am at a loss as to how to incorporate the Employee parameter in the code as this code below does not work
DoCmd.OpenReport "EmpBalSheet1", acViewPreview, , "[EmployeeName]" & "[VisitDate] Between #" & Me.Text2 & "# And #" & Me.Text4 & "#"
I know I am missing something, but don't know what. Any help will be greatly appreciated!
Thank you to all the great programmers that help out there!