Results 1 to 4 of 4
  1. #1
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110

    Specific Field Update

    I'm creating a Document Control Database.

    The Database essentially is 2 tables.
    1 Document Details
    2 Version Control
    I want to click a button, the control adds todays date to the date field when the update button was clicked.

    The button is on a continuous form in the footer. the query filters the records to show all the historic versions for the document being viewed.

    I'm not sure how to code the update.
    My fields in the version control table are:
    PK
    FK
    DocumentAmendment
    Amendedby
    DateAmended
    Version


    DateUpdated
    If the query form shows 4 versions, I want to add the new record, I can do that, but I need to set the DateUpdated for record 4 to todays date.

    Any pointers or methods I should use would be helpful.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Generally:

    Me.ControlName = Date()

    In your case

    Me.DateUpdated= Date()

    Presuming the textbox has the same name as the field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I should add that the method could change depending on how you're adding the new record, but it would involve the Date() function (or the Now() function if you want the time included).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    @Steven19

    Can you give us a 4 -5 line overview of your "Document Control" application?

    Just want get some idea of:
    -the kinds of documents involved
    -the number of users
    -the permissions of the users(add,modify, delete, ReadOnly...)
    -the volumes
    -the types of access (queries, reports)

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

Similar Threads

  1. Replies: 4
    Last Post: 06-08-2018, 09:01 AM
  2. Replies: 1
    Last Post: 11-17-2017, 09:44 AM
  3. Replies: 6
    Last Post: 08-05-2017, 06:43 PM
  4. Query to update specific field in table
    By Jblackbelt in forum Queries
    Replies: 5
    Last Post: 10-08-2014, 11:16 AM
  5. update field with specific content
    By luxeon in forum Queries
    Replies: 2
    Last Post: 01-24-2011, 03:29 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