Hi
I'm relatively new to VBA programming and something got me stumped right at the beginning.
I want to display some user-defined properties from the database properties (the ones you get from the 'file / database properties' menu) on a form. I have 2 problems with this:
- First i'm not sure where in the object module they are hidden and how to get to them.
- secondly i can't use the 'currentdb' object (i have set a reference to the DAO library).
The code snippet below turns up the 'Object variable or with block variable not set' error.
Dim dbs as database
set dbs = currentdb
debug.print dbs.name
With the debugger, the dbs variable still shows a contents of 'nothing'.
I suppose i've missed a basic step somewhere.
Can somebody help please!!
I'm relatively new to VBA programming and something got me stumped right at the beginning.
I want to display some user-defined properties from the database properties (the ones you get from the 'file / database properties' menu) on a form. I have 2 problems with this:
- First i'm not sure where in the object module they are hidden and how to get to them.
- secondly i can't use the 'currentdb' object (i have set a reference to the DAO library).
The code snippet below turns up the 'Object variable or with block variable not set' error.
Dim dbs as database
set dbs = currentdb
debug.print dbs.name
With the debugger, the dbs variable still shows a contents of 'nothing'.
I suppose i've missed a basic step somewhere.
Can somebody help please!!