Sep 3, 2002 #1 sabavno Programmer Jul 25, 2002 381 CA Hi I have a table called 'CONFIGURATION' that has a numeric 'ModelID' field. How would I lookup the max value of that field from the vba code? Thanks
Hi I have a table called 'CONFIGURATION' that has a numeric 'ModelID' field. How would I lookup the max value of that field from the vba code? Thanks
Sep 3, 2002 #2 KenReay Programmer Aug 15, 2002 5,424 GB Hi You could use dMax() See help for syntax, or you could use a recordset based on select statement ordered by ModuleId Desc then read the first row. Regards Ken Reay Freelance Solutions Developer Boldon Information Systems Ltd UK kenneth.reay@talk21.com Upvote 0 Downvote
Hi You could use dMax() See help for syntax, or you could use a recordset based on select statement ordered by ModuleId Desc then read the first row. Regards Ken Reay Freelance Solutions Developer Boldon Information Systems Ltd UK kenneth.reay@talk21.com
Sep 3, 2002 #3 rgbanse MIS Jun 4, 2001 211 US Sabavno, Give this a try Function FindMaxValue() Dim MaxValue As String MaxValue = DLookup("Max([FieldName])", "TableName" MsgBox MaxValue End Function RGB Upvote 0 Downvote
Sabavno, Give this a try Function FindMaxValue() Dim MaxValue As String MaxValue = DLookup("Max([FieldName])", "TableName" MsgBox MaxValue End Function RGB