this returns the date of my latest record from Table1.
------------------------------------------------------------------------------------
I'd like to show the result on a msgbox, meaning, when user clicks a button,
i'll launch the MsgBox and the result should be placed on the msgbox.
dim rstData as ADODB.recordset
dim strSQL as string
strsql = "Select max([date]) AS MaxOfDate from Table1"
rstdata.open strsql
if rstdata.BOF then
msgbox "Query returned no results"
else
msgbox "The latest date is: " & rstdata("MaxOfDate")
endif
set rstdata = nothing
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.