Results 1 to 2 of 2
  1. #1
    Sightly is offline Novice
    Windows 8 Access 2016
    Join Date
    May 2020
    Posts
    4

    Updating a record when one has already been made today vs creating a new record

    Hi everyone, I have two tables one with information on the equipment we have and another that is pretty much a daily checklist for the equipment. I have a form to enter information into the daily checklist and am using a ComboBox Connected with my equipment table to be able to pull serial numbers and test info for the machines. I want to make one record each day for each piece of equipment, but the checks are done in the morning and afternoon so I was wondering if it was possible to search the daily checklist table and see if there was a already a record with that serial id number and the current date and if so have the form be able to update that record but if not then to create a new record instead. I am relatively new to access so this may seem like a bad approach and if that’s the case any info on a better way to approach this problem would be appreciated !

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Certainly can. Use VBA and do a DLookup() or DCount().

    Also, set compound index on ID and date fields and duplicate pairs will not be allowed.
    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. lock record so no changes can be made
    By angie in forum Access
    Replies: 15
    Last Post: 04-07-2018, 02:30 PM
  2. Save record so no changes can be made
    By angie in forum Programming
    Replies: 5
    Last Post: 04-26-2017, 06:45 AM
  3. Replies: 0
    Last Post: 03-11-2015, 04:46 PM
  4. Updating Multiple Record Form Based on Record Count
    By William McKinley in forum Forms
    Replies: 2
    Last Post: 12-31-2014, 12:45 PM
  5. Replies: 11
    Last Post: 02-01-2012, 01:14 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