Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2016
    Posts
    5

    Getting data from a stored field.

    Hi all,


    I've tried searching for this but always come up with a slightly different answer.

    Here's my question, how do I recall data from a field belonging to a record.

    My database tracks project of a task. So, each week ending has shows a list of the tasks gathered from another table.

    Week Ending----------Task----------%Complete
    1/01/16 Task1 10%
    Task2 20%


    08/01/16 Task1 15%
    Task2 30%

    When i start a new record "week ending" i'm shown the tasks available and i'm able to inset a %complete into that field. At that stage i would also like to compare the previous weeks percentage from that task?

    I have drawn a text box in my sub form but i have no way of recalling the previous weeks record but not sure if this is right?

    I'd be very great full if you could help me.

    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    This is something best done in a report.

    Pulling a value from another record requires subquery http://allenbrowne.com/subquery-01.html#AnotherRecord

    or domain aggregate function such as DLookup().
    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
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    without knowing your structure its hard to tell. is each week and their percentage stored in a table or just equated? if stored then use a query behind it.

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    well - "previous week" must be identified specifically based upon your current week. there is more than 1 way to skin this cat and it somewhat depends on how much code and the structure of your data....

    but to call another record's data (in this case previous week) into the current record in order to do a calculation requires a query that will result in just the previous week's record - save that with a name PreWeek

    then you could use a DLookUp method to get the data (you'll want to look that up online)...or possible you could do a join to the current record....or again rely on a sub form.... it all depends on the interface you are developing.

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

Similar Threads

  1. Replies: 8
    Last Post: 04-13-2012, 12:25 PM
  2. Replies: 16
    Last Post: 04-11-2012, 10:56 AM
  3. Stored vs. Displayed Data for a ComboBox
    By tylerg11 in forum Forms
    Replies: 1
    Last Post: 12-14-2011, 03:11 PM
  4. Where is check box data stored?
    By JeffG3209 in forum Forms
    Replies: 3
    Last Post: 09-09-2011, 11:23 PM
  5. Can Data be Stored in a Report
    By jgross in forum Reports
    Replies: 1
    Last Post: 02-02-2011, 10:31 PM

Tags for this Thread

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