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

    Unanswered: help in select/update query

    Hello all, I am trying to do 2 things with my query. 1st is my select query, where i put in a date of what i want to update (records with date_recd=03/29/2010, date_emailed=null) then I click my update query (update with date emailed=03/29/2010,userid_emailed=environ"username").

    My problem is that it doesnt allow me to save my update criteria and my select criteria in the same query. When i save in select query it blanks out my update criteria of environ"username".

    Is there a better way to do what im trying to acheive? Im trying to come up with ideas.. but nothing yet. Thanks..Chris

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    What do you mean with
    ... to save my update criteria and my select criteria in the same query.
    In Access you cannot have one single query that performs several types of operations (SELECT, INSERT, UPDATE, DELETE), as you can have in a SQL stored procedure.

    However, what you can do is to use a SELECT query as the sub-query of another, even if this other query is not a SELECT query.

    e.g.
    Code:
    UPDATE MyTable 
    SET MyColumn = <some value>
    WHERE SomeColumn IN ( SELECT ... )
    Is it what you're looking for? If not, please provide a more detailed explanation of what you try to achieve.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •