Solved

Access: Make textbox display oldest date in my table

Posted on 2007-12-05
7
454 Views
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"

0
Comment
Question by:ouestque
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
Put this formula in the control source for the textbox:

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

Accepted Solution

by:
GRayL earned 400 total points
Comment Utility
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
 
LVL 44

Expert Comment

by:GRayL
Comment Utility
One  more time:

Private Sub cmdShowEarliest()

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

End Sub
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
>> =DMax("[Dates]", "[Date_List]")

I think you mean DMin ()

mx
0
 
LVL 92

Assisted Solution

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

Yup, that's what I meant :)
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Be sure to remember me in your will :-)

mx
0
 

Author Comment

by:ouestque
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

763 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now