Hi,
This should be a very easy question to answer. But I can't find any info on the net.
How do I refer to my backend table in VBA code (DAO) using the set method?
I use 'Set db = Currentdb' all the time in my code. But now I need to run a query on my backend. I've tried various forms of:
<code>Set db2 = "R:\myPathToBackend\mydb_be.mdb"</code>
I've also tried putting the path/filename into a variable, but still no luck.
In Excel VBA I use something similar, something like:
<code>Set wb2 = Workbooks.Open("R:\myPathToSpreadsheet\file.xls", False)</code>
What would be the equivilant in Access VBA?
Thanks,
K
This should be a very easy question to answer. But I can't find any info on the net.
How do I refer to my backend table in VBA code (DAO) using the set method?
I use 'Set db = Currentdb' all the time in my code. But now I need to run a query on my backend. I've tried various forms of:
<code>Set db2 = "R:\myPathToBackend\mydb_be.mdb"</code>
I've also tried putting the path/filename into a variable, but still no luck.
In Excel VBA I use something similar, something like:
<code>Set wb2 = Workbooks.Open("R:\myPathToSpreadsheet\file.xls", False)</code>
What would be the equivilant in Access VBA?
Thanks,
K