Using the Format$ property to define a control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hers2keep

    #1

    Using the Format$ property to define a control

    I have the following control on a report:

    "Total " & [ProductCode] & " " & [Form] & " -- " &
    Format$(Sum([SumOfNetWeight]),"Standard")

    I can't use the simple way because of the concatenated fields. How can
    I force no decimal point on the Standard formatting?

    Thanks,
    Carla

  • fredg

    #2
    Re: Using the Format$ property to define a control

    On 22 Mar 2005 08:12:38 -0800, Hers2keep wrote:
    [color=blue]
    > I have the following control on a report:
    >
    > "Total " & [ProductCode] & " " & [Form] & " -- " &
    > Format$(Sum([SumOfNetWeight]),"Standard")
    >
    > I can't use the simple way because of the concatenated fields. How can
    > I force no decimal point on the Standard formatting?
    >
    > Thanks,
    > Carla[/color]

    ="Total " & [ProductCode] & " " & [Form] & " -- " &
    Format$(Sum([SumOfNetWeight]),"#,###.")
    --
    Fred
    Please only reply to this newsgroup.
    I do not reply to personal email.

    Comment

    • MGFoster

      #3
      Re: Using the Format$ property to define a control

      fredg wrote:[color=blue]
      > On 22 Mar 2005 08:12:38 -0800, Hers2keep wrote:
      >
      >[color=green]
      >>I have the following control on a report:
      >>
      >>"Total " & [ProductCode] & " " & [Form] & " -- " &
      >>Format$(Sum ([SumOfNetWeight]),"Standard")
      >>
      >>I can't use the simple way because of the concatenated fields. How can
      >>I force no decimal point on the Standard formatting?
      >>
      >>Thanks,
      >>Carla[/color]
      >
      >
      > ="Total " & [ProductCode] & " " & [Form] & " -- " &
      > Format$(Sum([SumOfNetWeight]),"#,###.")[/color]

      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      It is better to use Int() to just get the integral value of a number,
      'cuz Format(number," #") will round decimal values. Also, do not include
      the decimal point in the format mask, it will come out in the result.
      E.g. (debug window):

      ? format(999.99," #,###.")
      1,000.

      ? format(Int(9999 .99), "#,#")
      9,999

      --
      MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
      Oakland, CA (USA)

      -----BEGIN PGP SIGNATURE-----
      Version: PGP for Personal Privacy 5.0
      Charset: noconv

      iQA/AwUBQkB7lIechKq OuFEgEQJzbgCdEV CMWlUw5ItuAAMS/7EtscC02pkAn1Ww
      N3KHYi45QgCg57+ BxFm4lsLT
      =urr2
      -----END PGP SIGNATURE-----

      Comment

      Working...