Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    1

    Query expression for form

    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.

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Rather than using NOT LIKE, why not jut use the <> operator?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2010, 04:01 PM
  2. Expression Builder
    By mistaken_myst in forum Access
    Replies: 2
    Last Post: 05-07-2008, 01:30 PM
  3. Replies: 0
    Last Post: 11-04-2006, 02:31 AM
  4. Field gets data from Expression?
    By Willot in forum Access
    Replies: 3
    Last Post: 12-10-2005, 06:28 PM
  5. Replies: 0
    Last Post: 12-05-2005, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums