cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Size for Numeric fields - 2007 vs. 2005

Former Member
0 Kudos

Hi,

I set up a user-defined field with VB code in 2005 with an edit size of one; no problem. The same code in 2007 fails saying that the field size deviates from legal range [1...11]. The "1" I am using is in the range.

Any ideas?

Thx, mike

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear

The UserFieldsMD.Size property is the actual size of the field in the

database and is set automatically based on the value set in the

UserFieldsMD.EditSize property. You should not assign any value to the

Size property.

So in your code, replace

uf.Size = 1;

with

uf.EditSize = 1;

best regards,

xiaodan an

Former Member
0 Kudos

xiaodan,

Thanks. But I am already and always have been setting the EditSize. We have functions that we use for adding fields and these functions have always been setting the edit size and not the size.

Thanks again,

Mike