Results 1 to 2 of 2
  1. #1
    tom4038 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    5

    making into update query

    i have this query which returns correct results,which i managed to put together after a few hours!!



    SELECT Max(qryAllALARMS.SentTimeStamp) AS MaxDate, qryAllALARMS.PhoneNumber
    FROM qryAllALARMS
    GROUP BY qryAllALARMS.PhoneNumber
    HAVING (((Max(qryAllALARMS.SentTimeStamp))<Date()-"7"));
    Now need it to update a table, unitDetails.Status with "pending", so it needs to be an update query??

    qryAllALARMS.PhoneNumber will match unitDetails.phonenumber, sorry about my terminology, im new to all this

    I have tried to build a query below but didnt get far!


    UPDATE unitDetails SET unitDetails.Status = "Pending"
    WHERE wot next here ??

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm not sure how your query is working correctly since this line:
    HAVING (((Max(qryAllALARMS.SentTimeStamp))<Date()-"7"));
    ...is subtracting a string "7" from a number Date()

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

Similar Threads

  1. Update Query
    By Najeeb in forum Queries
    Replies: 1
    Last Post: 11-19-2015, 04:02 AM
  2. Update query help!!!
    By GUMUBIBI in forum Queries
    Replies: 4
    Last Post: 09-07-2009, 09:09 AM
  3. Making a new field in a query
    By mslieder in forum Queries
    Replies: 3
    Last Post: 05-14-2008, 11:44 AM
  4. Update Query
    By GrnISSO in forum Queries
    Replies: 0
    Last Post: 06-15-2007, 05:41 PM
  5. Need help with Update Query
    By starswinger007 in forum Queries
    Replies: 1
    Last Post: 02-22-2006, 08:44 PM

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