I have an Access project linked to SQL server data.
In my VBA code I want to get the result of a query into a variable. The stored proc returns one value, with a field name of "count". In Access I would normally use DLookup but this wont work with SQL procs.
I can successfully run SQL procs using DoCmd.RunSQL but how can I assign their results to variables?
Kind regards.
Start Free Trial