I have an unbound text box in one of the forms. In the text box, the user enters a date. Once the date is entered, the query needs to pick that date from the form.
Right now, I did an update query using a dumpy date. Here is the SQL statement:
UPDATE Galdump INNER JOIN (STAFF INNER JOIN STAFF_PHONE_NUMBERS ON STAFF.ST_ID = STAFF_PHONE_NUMBERS.ST_ID) ON (Galdump.country = STAFF_PHONE_NUMBERS.GALCountry) AND (Galdump.forename = STAFF_PHONE_NUMBERS.ST_FIRST_NM) AND (Galdump.city = STAFF_PHONE_NUMBERS.Location) SET STAFF.EmailSource = "10/6/2006", Galdump.Indication = "Y-Match First Name & Country & City", STAFF.st_email = Galdump.mailaddress
WHERE (((STAFF.EmailSource) Not Like "10/6/2006" And (STAFF.EmailSource) Not Like "not outlook" And (STAFF.EmailSource) Not Like "checked*" And (STAFF.EmailSource) Not Like "NIG*") AND ((Galdump.Indication) Is Null) AND ((Left([galdump].[surname],5))=Left([staff].[st_last_nm],5))) OR (((STAFF.EmailSource) Is Null) AND ((Galdump.Indication) Is Null) AND ((Left([galdump].[surname],5))=Left([staff].[st_last_nm],5)));
Whereever the date, I need to put an expression: [forms]![frmExtractInformation]![txtDate]. But this doesn't work.
Can you help me find the correct expression that needs to be inserted next "Not Like" and the one that's bolded. Please note that the field that contains the date is a "text" data type, not a "date/time" date type. If you need more explanation, please let me know.
Thank you.