473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

Nov 13 '05 #1
2 1482
On 22 Mar 2005 08:12:38 -0800, Hers2keep wrote:
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


="Total " & [ProductCode] & " " & [Form] & " -- " &
Format$(Sum([SumOfNetWeight]),"#,###.")
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
fredg wrote:
On 22 Mar 2005 08:12:38 -0800, Hers2keep wrote:

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

="Total " & [ProductCode] & " " & [Form] & " -- " &
Format$(Sum([SumOfNetWeight]),"#,###.")


-----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:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBQkB7lIechKqOuFEgEQJzbgCdEVCMWlUw5ItuAAMS/7EtscC02pkAn1Ww
N3KHYi45QgCg57+BxFm4lsLT
=urr2
-----END PGP SIGNATURE-----
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an...
2
by: Dalan | last post by:
This should not be an issue, but it is. I'm sure that someone knows what little piece of code is needed too persuade Access 97 to include a currency format for labels (Avery, mailing type). Have...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
5
by: han zhiyang | last post by:
Hi. I tried to design a custom web control which can flexibly and dynamicly let the control user ,for example the web page developer, customize its layout codes.This control derives from...
12
by: Rob Meade | last post by:
Hi all, Ok - I've come from a 1.1 background - and previously I've never had any problem with doing this: Response.Write (Session("MyDate").ToString("dd/MM/yyyy")) So, I might get this for...
4
by: Jon Paal | last post by:
when user loses their password, the membership module emails a new password , the format is very complex. how can I set the format to be simple alphanumeric - say 7 characters long ?
1
by: JFKJr | last post by:
Hello everyone, the following Access VBA code opens an excel file and creates textboxes in a given range of cells dynamically. The code attaches "MouseUP" and "Exit" events to the textboxes (using...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.