I am trying to figure out if this line of code is usable, but I don't know: DoCmd.RunSQL ("SELECT Max([BSRangeTbl].[Date]) AS MAXofDate FROM [BSRangeTbl];") I am stumped again, my usual state of mind.
I am trying to figure out if this line of code is usable, but I don't know: DoCmd.RunSQL ("SELECT Max([BSRangeTbl].[Date]) AS MAXofDate FROM [BSRangeTbl];") I am stumped again, my usual state of mind.
If you want the result in a variable, you'd have to open a recordset on that SQL. Alternatively you could use DMax().
In addition to what Paul said, the reason you cannot use that line of code is:
The RunSQL command is used to execute a Microsoft Access action query.
Action queries append, update or delete records. You cannot use RunSQL for a select query.