Eljefegeneo
Still trying to learn
- Local time
- Yesterday, 17:00
- Joined
- Jan 10, 2011
- Messages
- 902
I have a query that has a date field on it. I have a form that selects the date for which I want to have all results >= the date selected by the date picker.
The query without criteria is:
However, when I insert a criteria from an unbound form with a date field named [DateOfContact], i.e. any date after a certain date, I get the error message that the expression is typed incorrectly or is too complex. All I have is an unbound form with a date field that I am referencing.
The criteria is:
The SQL statement that gives me this error code is
Inserting a date in the query criteria works fine, but I just cannot figure out how to pass the criteria from the form to the query.
The query without criteria is:
Code:
SELECT tblSalesContactsFinal.ContactID, tblSalesContactsFinal.ClientID, tblSalesContactsFinal.DateOfContact
FROM tblSalesContactsFinal;
The criteria is:
Code:
>=Forms![frmEmailBlast]![LastContactDate]
Code:
SELECT tblSalesContactsFinal.ContactID, tblSalesContactsFinal.ClientID, tblSalesContactsFinal.DateOfContact
FROM tblSalesContactsFinal
WHERE (((tblSalesContactsFinal.DateOfContact)>=[forms]![frmEmailBlast]![LastContactDate]));