Results 1 to 6 of 6
  1. #1
    newegyptian is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2019
    Posts
    46

    how to set data of field based on previuos record

    How i can set data in certain field of record . Based on data of field in previous record.
    Or how to be based on data field of first record



    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    records cannot see each other....And shouldnt be.
    What do you want from the previous record?

  3. #3
    newegyptian is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2019
    Posts
    46
    Quote Originally Posted by ranman256 View Post
    records cannot see each other....And shouldnt be.
    What do you want from the previous record?
    The patient come to me as visit of examenation so the next visit will be consultaion and next will be examination again then next is consultaion and so on
    Each is based on name of previous record

    If previous is examinatio so it will be consultation and vise versa

  4. #4
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    If you're using a form (as you should be) the DLast function can return the status for a given person if based on a reliable progression (such as last visit date). You then set the status for the new record appropriately. If you wish, you can employ validation code so that the new value cannot be the same as the Last value.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    newegyptian is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2019
    Posts
    46
    Quote Originally Posted by Micron View Post
    If you're using a form (as you should be) the DLast function can return the status for a given person if based on a reliable progression (such as last visit date). You then set the status for the new record appropriately. If you wish, you can employ validation code so that the new value cannot be the same as the Last value.
    should i put dlast function in expression if the field box or where
    please geiv me steps slowly

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I would recommend a query with a where clause to get latest Visit date for this patient etc.
    I would not use DLast --which says
    You can use the DLast function to return a random record from a particular field in a table or query when you need any value from that field.
    I have seen issues reported with DFirst and DLast, so opt for queries.

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

Similar Threads

  1. Replies: 7
    Last Post: 01-04-2018, 06:35 PM
  2. Replies: 8
    Last Post: 03-29-2017, 09:07 AM
  3. Replies: 9
    Last Post: 03-01-2017, 10:00 AM
  4. Replies: 3
    Last Post: 01-09-2015, 05:48 PM
  5. Replies: 1
    Last Post: 08-10-2014, 04:06 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