Some properties don't exist until they've been created. You'll notice that
in some code examples, objects are tested to see if they have a property
before setting it. You try to check the value of the object's property, trap
the error if one occurs, create the property if the error is that the
property doesn't exist, and then reroute your code back to the point where
you set it.
Is there some reason you can't set these startup properties once in a
template db? Generally startup properties don't get changed after they're
set.
hth
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"genegal" wrote:
> Maybe I didn't format my question properly:
>
> I don't know HOW I'm supposed to declare the actions through VBA. Whether
> it's supposed to be through a module, AutoExec macro, etc.
>
> Furthermore, when I used the above code, I was given as error saying that no
> property exists for such object, which clearly means that the code is wrong.
> Just to serve as a reminder, this code was taken from an MSDN page for Access
> 2000 for .mdb database files, not Access 2007 (i.e. accdb) files.
>
> Does anyone know if things might have changed since then? MSDN doesn't point
> anything out in terms of changes or revisions for Access 2007. So there's
> clearly something I'm not understanding.