I have the following line of code in a query and it returns a number value.
I have pasted the following into the VBA code and it errors. How do I also get this to return a figure say into a variable or string?
Thanks
Martin
Code:
SELECT Count(1) AS [Occasions]
FROM absent
WHERE (((absent.Name)="Jo"));
I have pasted the following into the VBA code and it errors. How do I also get this to return a figure say into a variable or string?
Code:
SQLText = "SELECT Count(1) AS [Occasions] FROM absent WHERE (((absent.Name)=Combo0.Value));"
DoCmd.RunSQL SQLText
Thanks
Martin