Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Property for .Fields and PropertyBag problem

Status
Not open for further replies.

VB400

Programmer
Sep 8, 1999
359
US
I'm having a problem with the following code:

objPB.WriteProperty "UserName", .Fields("UserName")

This gives me the following error message:

Run-time Error 330. Illegal parameter. Can't write object because it does not support persistence.

When I add the .Value property as in the following line, it works just fine:

objPB.WriteProperty "UserName", .Fields("UserName").Value

I know that .Value is the default property and should be picked up automatically. As a matter of fact, I use the .Fields without the .Value everywhere else and it works just fine. For some reason, it just doesn't work with propertybags.

Any ideas? Tarek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top