Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2020
    Posts
    1

    Selecting first time entry of a field including details


    I am trying to select the first time I entered a field value in a 20000+ table. I wish to retain the other details such as date, location etc.

    I have tried using the unique record method but that will not work for obvious reasons.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by Malcolm Storey View Post
    I am trying to select the first time I entered a field value in a 20000+ table. I wish to retain the other details such as date, location etc.

    I have tried using the unique record method but that will not work for obvious reasons.
    Don't understand. What are you trying to select and where
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    What determines 'first time'? A date or a sequence number?

    SELECT TOP 1 location, etc FROM table ORDER BY [date] WHERE field="something";

    Of course if there are multiple records with same date, will need other criteria to determine sort order. Maybe:

    SELECT TOP 1 location, etc FROM table ORDER BY ID WHERE field="something";

    Or maybe you want all "something":

    SELECT table.* FROM table WHERE ID IN (SELECT TOP 1 ID FROM table as Dupe WHERE Dupe.field = table.field ORDER BY ID);
    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.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Me neither. Suggest you define "earliest" as it's not as cut and dried as you might think.
    Earliest date? Then that should be simple seeing as how you've said you have a date field.
    "First" record based on some criteria? If there is no autonumber field, forget that. Even if there is, it's not 100% reliable, but would be very close.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. generate current date and time after field entry
    By Smiffy3594 in forum Access
    Replies: 6
    Last Post: 02-20-2020, 08:49 AM
  2. Replies: 7
    Last Post: 04-21-2017, 11:14 AM
  3. Selecting most recent entry in a table
    By mjwillyone in forum Programming
    Replies: 4
    Last Post: 01-04-2016, 09:54 AM
  4. Replies: 5
    Last Post: 11-30-2014, 08:12 PM
  5. Date/Time entry field on a form
    By Ted C in forum Forms
    Replies: 1
    Last Post: 06-22-2010, 12:28 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