So I went and turned on the show hidden objects and could see it AND it worked. When I turn off the show hidden objects, I CANNOT see it and it does not work. It would appear that the show hidden objects must be on to enable the property.
That was partly my point in an earlier post. Whether or not you use a hidden property in a database, show hidden members is switched off when you open a db... which is irritating.
However, you can still use hidden properties whether or not they are visible.
And I've checked this on two computers. The code works for me whether or not the hidden properties are visible.
Try my test db. One form, one button, one line of code. No extra refs.
The code works with hidden members ...hidden.
IMO it doesn't matter that there are other alternatives that we all use all the time and which we know work perfectly well.
The OP asked about this code and it appears to me that it should work perfectly.
MS clearly discourage using hidden properties but where they do something useful that can't be done so easily by other means, why not use them.
For example, the password protected
wizhook property that performs a significant role in the V-Tools add in
Obviously that's not the case here as good alternatives do exist.
EDIT 1:
Being as I've mentioned it 3 times now, this link gives the wizhook key & a long list of some of its uses
ftp://developpez.com/cafeine/access/access_wizhook.pdf
Hopefully anyone who reads that will see there are many good reasons for using that hidden member
EDIT 2:
I'm on a roll now. More info from an Access MVP
http://www.mvp-access.es/juanmafan/wizhook/wizhook.htm
Its in French but Google translate worked perfectly on the pages I looked at
I've only tried the simplest of these items so far & some can be done using documented alternatives ...but not all AFAIK