diddydustin
Programmer
Hey guys,
I'm trying to do this:
DoCmd.OpenReport "EMR_Time_Report", , , "MACHINE = " & Me!empMachine.Value & _
" AND Shift = " & Me!empShift.Value & " AND Date = " & Me!empDate.Value, , acWindowNormal
The problem is, I want the user to be able to select either the Machine, Shift, or Date, but not have to select all three. So if they select Shift 3 and nothing else, it will return all dates on all machines for shift 3.
When I am tring to run that DoCmd.OpenReport, it is returning an error because the WHERE critera will look like this:
MACHINE = AND SHIFT = 3 AND DATE =
How can I set up the WHERE critera so the user doesn't have to select all three values and can instead choose one or two?
Thanks
Dustin
I'm trying to do this:
DoCmd.OpenReport "EMR_Time_Report", , , "MACHINE = " & Me!empMachine.Value & _
" AND Shift = " & Me!empShift.Value & " AND Date = " & Me!empDate.Value, , acWindowNormal
The problem is, I want the user to be able to select either the Machine, Shift, or Date, but not have to select all three. So if they select Shift 3 and nothing else, it will return all dates on all machines for shift 3.
When I am tring to run that DoCmd.OpenReport, it is returning an error because the WHERE critera will look like this:
MACHINE = AND SHIFT = 3 AND DATE =
How can I set up the WHERE critera so the user doesn't have to select all three values and can instead choose one or two?
Thanks
Dustin