Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Hope someone else has come accross this and can point out my misconception.
The code below gives me 100 and then 197. The Stat box for that field shows 198 as the count, which ties up with 197 as I believe the ubound starts at 0. But why does the field GetPossibleValues count only return 100??
sub getcount
set x = ActiveDocument.Fields("CAT_PartNo").GetPossibleValues
msgbox x.Count
set LB = ActiveDocument.GetSheetObject("LB02") 'Contains CAT_PartNo
msgbox (ubound(boxvalues))
end sub
TIA,
Jane
Get possible values has a default limit of 100 values. Look at the parameters in the API guide. You can set it to another level if you need to pull more values.
Get possible values has a default limit of 100 values. Look at the parameters in the API guide. You can set it to another level if you need to pull more values.
Hi Thanks for that, I know you will think this is a stupid question but how do I return the count of the possible selections into a variable?
Having a complete mental block here.
TIA Jane
Found it!!
set fld=ActiveDocument.GetField("CAT_PartNo")
msgbox ("The field has "& fld.GetValueCount(1) &" selected values")