Expand|Select|Wrap|Line Numbers
- Set employeeOEE = db.OpenRecordset("SELECT [Query-OEE].[Machine Type], [Query-OEE].[Date], [Query-OEE].[Employee Name] FROM [Query-OEE] WHERE [Query-OEE].[Machine Type]= " & departtype & " AND [Query-OEE].[Date] BETWEEN " & startdate & " AND " & enddate & " AND [Query-OEE].[Employee Name]= " & empname & ";", dbOpenDynaset)
If I take out '"[Query-OEE].[Date] BETWEEN " & startdate & " AND " & enddate & "' I don't get an error. This is my first time using a date variable (which are entered in a form before this part of the code) so I may not have the syntax right on that portion.
I'm sure I just have something minor messed up. Can somebody help me out please?