Its actually looking back to another field on the form and what I want to do
is check the value in the level field and if it is greater than 4 go to one
field and if its less than 4 go to another field, I can do all that easy
enough but I just can't get the value from the level field
> Hi Nigel,
>
[quoted text clipped - 35 lines]
> >
> > thanks
Dave Lett - 05 Oct 2006 17:10 GMT
Hi Nigel,
The default value of the Level field is probably "70." However, the current
result of the Level field might be something else entirely. To get the
current result, use
MsgBox ActiveDocument.FormFields("Level").Result
HTH,
Dave
> Its actually looking back to another field on the form and what I want to
> do
[quoted text clipped - 46 lines]
>> >
>> > thanks
Tony Jollans - 05 Oct 2006 18:47 GMT
Actually the 70 is the value of the default property of the FormField. When
you reference the FormField with other than a Set statement you are asking
for the default property, which in this case is Type - wdFieldFormtextInput
(value 70). If you want the value as seen on screen (the Result) you should
explicitly say so, as per Dave's suggestion.
--
Enjoy,
Tony
> Hi Nigel,
>
[quoted text clipped - 57 lines]
> >> >
> >> > thanks
Dave Lett - 05 Oct 2006 17:11 GMT
Hi Nigel,
You can test this with the following:
ActiveDocument.FormFields("Level").Result = 44
MsgBox ActiveDocument.FormFields("Level")
MsgBox ActiveDocument.FormFields("Level").Result
HTH,
Dave
> Its actually looking back to another field on the form and what I want to
> do
[quoted text clipped - 46 lines]
>> >
>> > thanks
Nigel - 05 Oct 2006 18:31 GMT
Thanks Dave that worked,
Can I ask another question
I have some calculations ont he form and I want to nadd the totals together
so I am using the follwoing
ActiveDocument.FormFields("ATOTAL").Result =
ActiveDocument.FormFields("A1Ext").Result +
(ActiveDocument.FormFields("A2Ext").Result) +
(ActiveDocument.FormFields("A3Ext").Result) +
(ActiveDocument.FormFields("A4Ext").Result) +
(ActiveDocument.FormFields("A6Ext").Result)
if I use a msg box on each of those fields I will get the values in the
field ie 35.00 20.00 etc
but when I use the above statment it it treating the + as concat and joins
them together, the fields on the form are numbers, is ther an easy way to add
2 or more fields together
Thanks
> Hi Nigel,
>
[quoted text clipped - 58 lines]
> >> >
> >> > thanks
Dave Lett - 05 Oct 2006 19:13 GMT
Hi Nigel,
You can try specifying a data type:
CLong (ActiveDocument.FormFields("A1Ext").Result)
HTH,
Dave
> Thanks Dave that worked,
>
[quoted text clipped - 89 lines]
>> >> >
>> >> > thanks