If a property has not been used, there's a good chance it has not been
created, so you will get error 3270 if you try to use it.
This is true of all manner of properties, such as the Format of a Field in a
TableDef.
It's worth creating a little function to use for assigning these properties.
The function sets the property if it exists, or creates and sets it if
needed. The SetPropertyDAO() function here does that:
http://allenbrowne.com/AppPrintMgtCo...SetPropertyDAO
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"DZ" <(E-Mail Removed)> wrote in message
news:4CF19504-C443-455A-AB5C-(E-Mail Removed)...
>
> I added several Builtin properties to the DB properties collection and
> have
> been using them and setting their values programatically for a month. Now
> suddenly when I try to set a value i get an error message
> "Property not found" so added it again and the properties not message
> happens again later that same day.
>
> The properties were startup properties:
> • AllowShortcutMenus
> • AllowBuiltinToolbars
> • StartUpForm
>
> I created a work around which was to add them every time programmatically
> before i set their values programmatically with a on Error Resume Next in
> case they are already there. This solves the problem.
>
> I was just wondering why they would become unadded when for a month they
> stayed added with no problem.