Okay, this works but what happens if I migrate this (in the future) to an SQL server?
Could someone explain the difference between a table or query and a recordset? I always thought they were (technically) interchangeble. But since I can't assign a recordset to a rowsource in code I have come to think they are not.
If you plan to switch, you might want to use this syntax:
"SELECT * FROM crsBar IN ""C:\MyFolder\" & Year(Now) & ".mdb"""
This statement would change if you switch to SQL Server:
"SELECT * FROM crsBar IN """" ""ODBC;dsn=<your dsn>;database=" & Year(Now) & ";uid=<login name>;pwd=<password>"""
If you go this route, you can set a global variable upon system startup, with a string indicating the datasource. Use this string consistently throughout your app when building SQL statements. Then, when you switch to SQL Server, just change the assignment of the global variable.
As an alternative, you could link the tables to your application, and skip the "IN" clause.