User Profile
Collapse
-
That was it! Thank you! -
SQL Multiple WHERE Statements with Date Variables Problem
I'm trying to run a query using SQL in VBA. I want the query to only show data that matches 3 criteria. I'm using a WHERE statement with 2 AND's and my database doesn't seem to like that. I am also using date variables (startdate and enddate) in my SQL statement. My query code is below:
...Code:Set employeeOEE = db.OpenRecordset("SELECT [Query-OEE].[Machine Type], [Query-OEE].[Date], [Query-OEE].[Employee Name] FROM [Query-OEE] WHERE -
-
How to use public variables in a query field
I'm trying to define a field in a query using an expression. Part of that expression involves using public variables. First of all, is it possible to use variables in a query field? And if it is, what is the proper syntax for doing so?
Example: (This is in the query design. [Delivery Lead Time] is a current field in the query. EPEI and DC are the variables I want to use to calculate the LTR.)
LTR: [Delivery Lead Time]+"EPEI"+"DC"... -
I knew it was something easy! It works perfect now, thanks SmileyOne!Leave a comment:
-
Type Mismatch Error Dealing with SELECT CASE and Recordsets
I am completely stumped on what seems to be a completely simple thing.
What I'm trying to do is use a SELECT CASE with a recordset. The SELECT CASE looks at one field from the recordset to establish the CASE's. I looked at the table that this field comes from and the field's data type is "text." When I make my CASE's, the program runs fine if I just put numbers for the requirements.
I.E. Case "734"...
No activity results to display
Show More
Leave a comment: