Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Max Date in a recordset 1

Status
Not open for further replies.

plcman

Programmer
Feb 17, 2001
92
GB
Hi

I have 2 tables 1)Gauges and 2) Calibrations, they are linked through the field G_No. I have a form that shows the fields in the Gauges table, I also need to display on the form the date of the last entry into the calibrations field for the current gauge (G_No).

Any help would be appreciated.
 
How are ya plcman . . .

Try this in the forms [blue]OnCurrent[/blue] event (double check all table/field names):
Code:
[blue]   Dim Cri As String
   
   Cri = "[G_No] = [red][b]'[/b][/red]" & Me!G_No & "[red][b]'[/b][/red]"
   Me!TextboxName = DMax("[LastEntryFieldName]", "Calibrations", Cri)[/blue]
If G_No is numeric, remove the two single quotes in [red]red[/red]



Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Hi TheAceman1

That works just fine, Thanks for your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top