Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2014
    Posts
    4

    Unanswered: Opening a Form to the latest value in a field

    Hello,

    I manage a record database which uses a data entry form for new record entry and for record editing. The form includes a record ID field which is automatically generated/updated whenever a new record is entered.

    I would like to create a button which opens the form to whatever record contains the highest, or maximum value in the record ID field. I have a query in the database that returns the highest current value and the value of whatever the next value would be, but Access will not let me create a Where clause in which RecordID=qryMaxRecordID. If I can't use this query to get the value for the maximum record ID, how could I get the form to open to the maximum value of that field, or any other field?

    Thank you to whoever can help me.

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    496
    Provided Answers: 24
    Have the form connected to a query that sorts ID descending. The latest will be 1st.

  3. #3
    Join Date
    Apr 2014
    Posts
    4
    It appears I found a solution for now. I used the DMax function to references the highest/latest record ID in the table. I created a button that uses a macro to open the form and display the record where the record ID= DMax(Record ID, Table)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •