I would like to do something like this:
DoCmd.OpenQuery "select * from some_table;"
How would I do this?
Please keep in mind I don’t want to create a new query, save it, and run it. I just want to type the select statement in the VBA code and run it.
If you just want to get a max value, the DMax-Function should do the trick:
(corresponds to
SELECT MAX(fee) FROM courses WHERE region = 'UK').