Results 1 to 5 of 5
  1. #1
    homerj56 is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    Roswell, GA
    Posts
    8

    Getting Expression-Relayed Data to Table

    Title sould be "Expression-Related"



    I have the following field in a query:

    Status1: IIf([Rem_Closed] Is Not Null And [Closed_Date] Is Not Null And [Closed_Name] Is Not Null,"Closed","Open")

    I use this in a bound form to auto-populate a text box (called auto_status) to automatically decide if the text box should say "closed" or "open" (based on stated conditions). This works fine.
    The problem is that I need to write this status back to the underlying query's field, called "Status", which then gets it back to the underlying table.

    Having the field "Status1" in the query is just a calculated field based on conditions but I also need that result written back to the same query's field (called Status).

    Any help is appreciated.

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    use a update query to save the calculated field.

    update tablename set [status]=IIf([Rem_Closed] Is Not Null And [Closed_Date] Is Not Null And [Closed_Name] Is Not Null,"Closed","Open")

  3. #3
    homerj56 is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    Roswell, GA
    Posts
    8
    Can I do this in the existing query or do I have to create a new query with just this field?

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    create a new one.

  5. #5
    homerj56 is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Location
    Roswell, GA
    Posts
    8
    Quote Originally Posted by weekend00 View Post
    create a new one.
    Ok, I'm a bit stumped with this.


    NEVER MIND, I figured it out! Thanks.

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

Similar Threads

  1. Data type mismatch in criteria expression
    By shexe in forum Queries
    Replies: 2
    Last Post: 09-01-2010, 12:47 PM
  2. Replies: 7
    Last Post: 12-30-2009, 11:03 AM
  3. Replies: 0
    Last Post: 08-01-2009, 12:43 PM
  4. Replies: 1
    Last Post: 07-12-2009, 05:09 PM
  5. Field gets data from Expression?
    By Willot in forum Access
    Replies: 3
    Last Post: 12-10-2005, 06:28 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