Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 26th, 2016, 01: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
Reply With Quote
  #2 (permalink)  
Old May 26th, 2016, 09: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.
Reply With Quote
  #3 (permalink)  
Old May 27th, 2016, 05: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 07:41 AM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 04: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 02:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 05:56 AM



All times are GMT -4. The time now is 04:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.