Results 1 to 4 of 4
  1. #1
    Demonic is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    2

    How to move a value from a query into a table or form?

    Hello,



    Under the Service Info Tab, I am trying to add the amount of weeks in Weeks Paid to the Start Date to self generate the Transition Date.

    I got my formula to work in the Transition Query but now want it to show in the Accounts Form in the Service Info Tab in the Transition Date.

    I need help in either moving the Transition Date value from the Transition Query to the Accounts Transition Date Table or just having the Transition Date value from the Transition Query showing in the Transition Date box in the Service Info Tab in the Accounts Form.

    Hope this makes sense.

    Can anyone help me?

    Thanks!
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Have the calculation in the ControlSource of Transition Date textbox:

    =[Start Date]+[Weeks Paid]*7

    Set the textbox TabStop property to No.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Demonic is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    2
    Got it! Thanks! but now how do I make that value be saved in the accounts table in the Transition date column?

    Thanks for all the help June 7!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Saving calculated values is usually not necessary and can even be a bad idea. One example of bad is a person's calculated age. This data gets stale quickly. Calculate a person's age when needed.

    Same can be done with your data. Calculate when needed.

    If you must save then need code. If the Transition date field is part of the form's RecordSource, could be simple as:

    Me!Transition = Me.tbxTransition

    Or

    Me!Transition = Me![Start Date]+Me![Weeks Paid]*7

    The trick is figuring out what event to put the code in - perhaps the Close event of the form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 19
    Last Post: 06-05-2012, 08:19 AM
  2. Replies: 5
    Last Post: 03-02-2012, 02:47 PM
  3. Move a single record to an archive table
    By 10 Gauge in forum Forms
    Replies: 7
    Last Post: 02-14-2011, 06:50 AM
  4. Move or Copy a table to another database
    By Harley Guy in forum Access
    Replies: 7
    Last Post: 11-08-2010, 11:49 PM
  5. Move data from one table to another
    By rebyrd in forum Queries
    Replies: 2
    Last Post: 12-24-2009, 12:52 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