Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Access 2013 Programming
This is the forum to discuss the Wrox book Professional Access 2013 Programming by Teresa Hennig, Ben Clothier, George Hepworth, Dagi (Doug) Yudovich; ISBN: 978-1-118-53083-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Access 2013 Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 26th, 2016, 12:46 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Location: Geneva, Switzerland
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Format([Field],"Standard")?

Hello,

In the query design view I have a numeric field--whole number (no decimal places)--that I want to have displayed in a given format. However, when I try the line in the subject I get the following message.

Access can't evaluate an expression because a value's data type isn't compatible with its operator.

Can you please help? I've tried changing the data type in the table design, and I have also tried formats like #,###.00, but no I always get the same message.

I have also searched the Web but as you probably know there's almost no documentation about Web Apps.

Thank you
Leonel
  #2 (permalink)  
Old May 26th, 2016, 08:50 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Leonel,

The following will work:

Code:
Format([YourFieldName], "#,###.00")

Add the format for negative numbers as needed.
  #3 (permalink)  
Old May 27th, 2016, 04:20 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Location: Geneva, Switzerland
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Doug,

I had tried that. I've discovered the problem was I was not defining the result as an expression (but as an aggregation).

I ended up with Format(Sum([Field]),"#,###"). So, the aggregation is within the expression and the query field is defined as an expression.

Best
lg

Last edited by lguzman01; May 27th, 2016 at 06:41 AM..


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel problem-"Target table is not in correct format" charankumar1985 Excel VBA 2 January 14th, 2011 03:21 PM
MSXSL gives error message for "for" inside "select" ilyaz XSLT 1 December 9th, 2010 05:02 PM
"Conversion to Dalvik format failed with error 1" egg86 BOOK: Professional Android 2 Application Development 1 September 24th, 2010 03:11 PM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.