Results 1 to 3 of 3
  1. #1
    Shouer is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2016
    Posts
    1

    How to use the last entry in a subform to update fields in a Table

    Hi there,



    I have a data base in which I have a main table with the details of my records and I also have another table with some date details. For example one person from the main table may have only one entry for date details in the subform and some other person may have 3 date entries in the subform. My main table contains of the same date details fields and I would like to find the way to update those fields in the main table taking the corresponding data from the last entry in the subform.

    I am aware of the Update Query existence but I have never used this.

    Can some one give me some tips on this?

    Thank you,
    D.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    in your query, use the picker (it always gets the syntax correct)
    to reference the subform fields. usually: forms!frmMain!subform!form!txtDate

    if the user has the cursor on the subform record, THATS the record that is used in the query.
    Be sure to reference the key ID of the record too.

  3. #3
    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,726
    shouer,

    Can you describe what your business is in plain, simple English --no database jargon?

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

Similar Threads

  1. Update multi value listbox fields from subform
    By Stephenson in forum Programming
    Replies: 3
    Last Post: 10-10-2015, 09:00 PM
  2. Update fields from subform to main form
    By gstylianou in forum Access
    Replies: 4
    Last Post: 06-10-2014, 12:59 AM
  3. Replies: 8
    Last Post: 05-30-2013, 05:06 PM
  4. Missing data entry fields in my subform
    By Nashskye13 in forum Forms
    Replies: 7
    Last Post: 07-30-2012, 03:22 PM
  5. Replies: 3
    Last Post: 02-07-2012, 06:33 AM

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