[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

Access: Make textbox display oldest date in my table

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"

0
ouestque
Asked:
ouestque
  • 2
  • 2
  • 2
  • +1
2 Solutions
 
Patrick MatthewsCommented:
Put this formula in the control source for the textbox:

=DMax("[Dates]", "[Date_List]")
0
 
GRayLCommented:
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()

Me!txtDate.ControlSource=DMin("Dates","Date_List")
0
 
GRayLCommented:
One  more time:

Private Sub cmdShowEarliest()

  Me!txtDate.ControlSource=DMin("Dates","Date_List")

End Sub
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
>> =DMax("[Dates]", "[Date_List]")

I think you mean DMin ()

mx
0
 
Patrick MatthewsCommented:
DatabaseMX said:
>>I think you mean DMin ()

Yup, that's what I meant :)
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Be sure to remember me in your will :-)

mx
0
 
ouestqueAuthor Commented:
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now