A
Al
Hi All,
I am trying to get the max value in a field of a table
using the following statement.
DoCmd.RunSQL "SELECT Max(ABC1MASTER![CLAIM7]) AS
MaxOfCLAIM7 FROM ABC1MASTER;"
The code produces the error:
A RunSQL action requires an argument consisting of an SQL
statement.
When run from the immediate window I get:
Compile error: Argument not optional
The only other argument is one for usetransaction, which
does not change the result.
Apparently the code does not recognize the SQL so I tried
parenthesis and separators but I am missing something
Once this is running, do I need to dimension MaxOfClaim7
to use the value since there is an option explicit line?
Thanks,
al
I am trying to get the max value in a field of a table
using the following statement.
DoCmd.RunSQL "SELECT Max(ABC1MASTER![CLAIM7]) AS
MaxOfCLAIM7 FROM ABC1MASTER;"
The code produces the error:
A RunSQL action requires an argument consisting of an SQL
statement.
When run from the immediate window I get:
Compile error: Argument not optional
The only other argument is one for usetransaction, which
does not change the result.
Apparently the code does not recognize the SQL so I tried
parenthesis and separators but I am missing something
Once this is running, do I need to dimension MaxOfClaim7
to use the value since there is an option explicit line?
Thanks,
al