Access: Make textbox display oldest date in my table

Posted on 2007-12-05
Last Modified: 2013-11-28
I have a form(Name"Old_Date") On this form I have a textbox(Name: "Date")
I also have a table(Name:"Date_List", Columns: "Dates")

How do I make it so that when I press a button my textbox titled "Date" displays the oldest date in my table "Date_List" column: "Date"

Question by:ouestque
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
LVL 92

Expert Comment

by:Patrick Matthews
ID: 20414207
Put this formula in the control source for the textbox:

=DMax("[Dates]", "[Date_List]")
LVL 44

Accepted Solution

GRayL earned 400 total points
ID: 20414234
If by oldest you mean earliest, you need this code in the command button cmdShowEarliest, and change the name of the textbox to txtDate

Private Sub cmdShowEarliest()

LVL 44

Expert Comment

ID: 20414243
One  more time:

Private Sub cmdShowEarliest()


End Sub
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 75
ID: 20414259
>> =DMax("[Dates]", "[Date_List]")

I think you mean DMin ()

LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 100 total points
ID: 20414275
DatabaseMX said:
>>I think you mean DMin ()

Yup, that's what I meant :)
LVL 75
ID: 20414370
Be sure to remember me in your will :-)


Author Comment

ID: 20460469
Thanks for the help!!. Mathewspatrick got there first (I understood where he was going with his answer) but it was incorrect. GrayL submitted the first working answer.

Since GrayL submitted the first working answer he gets point majority. Mathewspatrick gets some points because he did respond first with the appropriate function type (Dmin/Dmax) but it was still incorrect.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question