Built in properties not found

  • Thread starter Thread starter DZ
  • Start date Start date
D

DZ

Hi

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.

....if you have any ideas on a better way to deal with this problem

Thanks for any insight
 
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/AppPrintMgtCode.html#SetPropertyDAO
 
There is no reason why data should go missing from your database,
so perhaps you have database corruption...but 9.99 times out of 10
it is user error. I can't think of any simple user errors, so

database corruption?
restored from backup?
imported to new database?
used the menu to remove the values?

(david)
 
Back
Top