Formatting decimal place with form name etc.

  • Thread starter Thread starter fishqqq
  • Start date Start date
F

fishqqq

Forms![fShpSpec]!Round([Text258],2)

I have a Text field that I need to update with a number - [Text258]
&"Pcs" expression but the [Text258] comes from another form and has
too many decimal places.

How do i format the setvalue expression to include the whole form &
field name etc?

Thanks
STeve
 
Forms![fShpSpec]!Round([Text258],2)

I have a Text field that I need to update with a number - [Text258]
&"Pcs" expression but the [Text258] comes from another form and has
too many decimal places.

How do i format the setvalue expression to include the whole form &
field name etc?

Thanks
STeve

Turn your expression inside out. Round() is a function; pass it the form
reference as an argument:

Round([Forms]![fShpSpec]![Text258], 2)

Note that this will cause an error if the field is null - if that's going to
happen sometimes use

Round(NZ([Forms]![fShpSpec]![Text258]), 2)
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Forms![fShpSpec]!Round([Text258],2)
I have a Text field that I need to update with a number - [Text258]
&"Pcs" expression but the [Text258] comes from another form and has
too many decimal places.
How do i format the setvalue expression to include the whole form &
field name etc?
Thanks
STeve

Turn your expression inside out. Round() is a function; pass it the form
reference as an argument:

Round([Forms]![fShpSpec]![Text258], 2)

Note that this will cause an error if the field is null - if that's goingto
happen sometimes use

Round(NZ([Forms]![fShpSpec]![Text258]), 2)
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com

thanks John, that works perfectly
 
Back
Top