yippie_ky_yay
Registered User.
- Local time
- Today, 02:04
- Joined
- Jul 30, 2002
- Messages
- 338
Hello,
I'm trying to use a query result in my code and am obviously a little unclear on something.
What I have is:
Dim MyResult
MyResult = DoCmd.RunSQL("...sql statement that I know works ...")
The SQL statement is a sum - so it only returns 1 result which is why I thought the compiler would be ok with it.
Is there something I'm missing? The error message I get is "Expected Function or Variable" - and the ".RunSQL" is what's highlighted.
Any help would be greatly appreciated!
-Sean
I'm trying to use a query result in my code and am obviously a little unclear on something.
What I have is:
Dim MyResult
MyResult = DoCmd.RunSQL("...sql statement that I know works ...")
The SQL statement is a sum - so it only returns 1 result which is why I thought the compiler would be ok with it.
Is there something I'm missing? The error message I get is "Expected Function or Variable" - and the ".RunSQL" is what's highlighted.
Any help would be greatly appreciated!
-Sean