Finding most recent date worked without code.

F

Flopbot

Does anyone know if there is some type of expression that I can type into one
of the controls in my form (“Volunteer Database Formâ€) that will return the
“most recent†date from the “Date Worked†column in a “Volunteer Hours
Tracking Table� I don’t know enough about Access 2003 to understand about
coding and queries and the like. Many thanks for any help! This has me
completely stumped!
 
T

Tom van Stiphout

On Fri, 3 Oct 2008 14:01:00 -0700, Flopbot

DMax will completely do what you want. Look it up in the Help file.

-Tom.
Microsoft Access MVP
 
F

Flopbot

Thank you so much for the help! That work almost perfectly. It definitely
returns the most recent date worked; unfortunately, I remembered about an
hour after posting the question that I left one small thing out. My
“Volunteer Hours Tracking Table†is on the many side of a relationship so I
only want it to return the most recent date for each group of primary keys
(For the 2's, for the 3's, etc.). When I typed in =DMax("[Date
Worked]","Volunteer Hours Tracking Table") it returns the most recent date
requardless of primary key. Sorry! Any further sage advice?

Al Campagna said:
Flopbot,
Use the DMax function against the DateWorked field in your table.
Use your own object names...
= DMax("[DateWorked]","tblVolunteerHours")
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Flopbot said:
Does anyone know if there is some type of expression that I can type into
one
of the controls in my form ("Volunteer Database Form") that will return
the
"most recent" date from the "Date Worked" column in a "Volunteer Hours
Tracking Table"? I don't know enough about Access 2003 to understand
about
coding and queries and the like. Many thanks for any help! This has me
completely stumped!
 
A

Al Campagna

Flopbot,
Check out DMax in Help...
Use the Where argument of DMax to find a "specific" last WorkDate
ex. (use your own object names)

= DMax("[DateWorked]","tblVolunteerHours", "PrimaryKey = " & PrimaryKey)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


Flopbot said:
Thank you so much for the help! That work almost perfectly. It
definitely
returns the most recent date worked; unfortunately, I remembered about an
hour after posting the question that I left one small thing out. My
"Volunteer Hours Tracking Table" is on the many side of a relationship so
I
only want it to return the most recent date for each group of primary keys
(For the 2's, for the 3's, etc.). When I typed in =DMax("[Date
Worked]","Volunteer Hours Tracking Table") it returns the most recent date
requardless of primary key. Sorry! Any further sage advice?

Al Campagna said:
Flopbot,
Use the DMax function against the DateWorked field in your table.
Use your own object names...
= DMax("[DateWorked]","tblVolunteerHours")
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Flopbot said:
Does anyone know if there is some type of expression that I can type
into
one
of the controls in my form ("Volunteer Database Form") that will return
the
"most recent" date from the "Date Worked" column in a "Volunteer Hours
Tracking Table"? I don't know enough about Access 2003 to understand
about
coding and queries and the like. Many thanks for any help! This has
me
completely stumped!
 
F

Flopbot

That did it! Thank you Al for your assistance!! I entered =DMax("[Date
Worked]","Volunteer Hours Tracking Table","[Volunteer ID] = " & [Volunteer
ID]) and it limits the results by primary key. When I checked MS help, it
gives an example of =DMax("[Freight]", "Orders", "[ShipRegion] = 'CA'"). Out
of curiosity, what does the & symbol do in your equation?

Thank you again!


Al Campagna said:
Flopbot,
Check out DMax in Help...
Use the Where argument of DMax to find a "specific" last WorkDate
ex. (use your own object names)

= DMax("[DateWorked]","tblVolunteerHours", "PrimaryKey = " & PrimaryKey)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


Flopbot said:
Thank you so much for the help! That work almost perfectly. It
definitely
returns the most recent date worked; unfortunately, I remembered about an
hour after posting the question that I left one small thing out. My
"Volunteer Hours Tracking Table" is on the many side of a relationship so
I
only want it to return the most recent date for each group of primary keys
(For the 2's, for the 3's, etc.). When I typed in =DMax("[Date
Worked]","Volunteer Hours Tracking Table") it returns the most recent date
requardless of primary key. Sorry! Any further sage advice?

Al Campagna said:
Flopbot,
Use the DMax function against the DateWorked field in your table.
Use your own object names...
= DMax("[DateWorked]","tblVolunteerHours")
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Does anyone know if there is some type of expression that I can type
into
one
of the controls in my form ("Volunteer Database Form") that will return
the
"most recent" date from the "Date Worked" column in a "Volunteer Hours
Tracking Table"? I don't know enough about Access 2003 to understand
about
coding and queries and the like. Many thanks for any help! This has
me
completely stumped!
 
A

Al Campagna

Flopbot,
The ampersand (&) concatenates the table field name to the numeric value
of the contol on the form.
(given Volunteer ID = 172)
Access "sees"...

[Volunteer ID] = 172
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Flopbot said:
That did it! Thank you Al for your assistance!! I entered =DMax("[Date
Worked]","Volunteer Hours Tracking Table","[Volunteer ID] = " & [Volunteer
ID]) and it limits the results by primary key. When I checked MS help, it
gives an example of =DMax("[Freight]", "Orders", "[ShipRegion] = 'CA'").
Out
of curiosity, what does the & symbol do in your equation?

Thank you again!


Al Campagna said:
Flopbot,
Check out DMax in Help...
Use the Where argument of DMax to find a "specific" last WorkDate
ex. (use your own object names)

= DMax("[DateWorked]","tblVolunteerHours", "PrimaryKey = " & PrimaryKey)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."


Flopbot said:
Thank you so much for the help! That work almost perfectly. It
definitely
returns the most recent date worked; unfortunately, I remembered about
an
hour after posting the question that I left one small thing out. My
"Volunteer Hours Tracking Table" is on the many side of a relationship
so
I
only want it to return the most recent date for each group of primary
keys
(For the 2's, for the 3's, etc.). When I typed in =DMax("[Date
Worked]","Volunteer Hours Tracking Table") it returns the most recent
date
requardless of primary key. Sorry! Any further sage advice?

:

Flopbot,
Use the DMax function against the DateWorked field in your table.
Use your own object names...
= DMax("[DateWorked]","tblVolunteerHours")
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Does anyone know if there is some type of expression that I can type
into
one
of the controls in my form ("Volunteer Database Form") that will
return
the
"most recent" date from the "Date Worked" column in a "Volunteer
Hours
Tracking Table"? I don't know enough about Access 2003 to
understand
about
coding and queries and the like. Many thanks for any help! This
has
me
completely stumped!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top