Executing a select statement, one row returned.

gpeirce

Registered User.
Local time
Today, 13:36
Joined
Sep 24, 2015
Messages
22
Why are the simplest tasks so complicated? I'm looking for a MAX value from a table. It will return just one row and one value. My coding looks like this:

strSQL = "SELECT Max(PCID) as maxPC FROM TblPallConsultant"

Now, how do I execute that statement? I know I can't use
docmd.runsql statement as that is for an action query.

How do i execute that statement and return the value in variable maxPC? I want to move that variable into a record into another table (for FC/PC consideration).

Thank you so much!
 

Users who are viewing this thread

Back
Top Bottom