473,395 Members | 1,677 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,395 software developers and data experts.

format query expression from dialog as percent

I am trying to format a query expression drawn from a dialog box as
percent.

The original statement to get the value for the query is as follows:

New%markup: [Forms]![Dialog Form]![NewMarkup]

The dialog box looks the values up from a table called NewMarkup. It
appears in the dialog box with a percent format. However, when I try
to call that value in my query it shows it as a decimal.

There is no option to format the field as currency.

I tried Format([Forms]![Dialog Form]![NewMarkup], "0.00%") and I get
the following error when executing...

"The expression is typed incorrectly, or it is too complex to be
evaluated. For example, a numeric expression may contain too many
complicated elements. Try simplifying the expression by assigning
parts of the expression to variables"

Please help.

Thanks!!
Nov 13 '05 #1
1 7959
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not quite sure what you want, but...

Format([Forms]![Dialog Form]![NewMarkup], "Percent")

will display the value in NewMarkup as a percent, as long as the value
in NewMarkup is a "correct" decimal value.

I hope you know that percent numbers are stored in tables as decimal
numbers. I.e.: 100% is stored as 1.00; 50.25% is stored as 0.5025;
etc. Therefore, to select records using a "percent" criteria you'd have
to indicate the percent value criteria as a decimal value. E.g.,
looking for records w/ 25%:

SELECT *
FROM table_name
WHERE Percent_Column = 0.25

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

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

iQA/AwUBQSEqJYechKqOuFEgEQLe8wCgoH1QrAUjjPWoWsa6E9+0PY zxvrcAnA5G
TN6/pn1ghFjEnlUQ47eiL94X
=SW0s
-----END PGP SIGNATURE-----
Terencetrent wrote:
I am trying to format a query expression drawn from a dialog box as
percent.

The original statement to get the value for the query is as follows:

New%markup: [Forms]![Dialog Form]![NewMarkup]

The dialog box looks the values up from a table called NewMarkup. It
appears in the dialog box with a percent format. However, when I try
to call that value in my query it shows it as a decimal.

There is no option to format the field as currency.

I tried Format([Forms]![Dialog Form]![NewMarkup], "0.00%") and I get
the following error when executing...

"The expression is typed incorrectly, or it is too complex to be
evaluated. For example, a numeric expression may contain too many
complicated elements. Try simplifying the expression by assigning
parts of the expression to variables"


Nov 13 '05 #2

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

Similar topics

3
by: Nothing | last post by:
This is going to be a really stupid question, but I am having a problem with the percent format in a control on a form. My end goal is that I want the user to enter 17 and have the control...
2
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to...
9
by: Mike Bridge | last post by:
I am using MS Access 2003, and I typed in a query in SQL view which was working fine. Now when I open it, it gives me the error "Join expression not supported". Apparently, Access "fixed" it for...
1
by: George Yachán | last post by:
I have added a new column to a typed dataset which displays an expression which is the result of one double (data type) field divided by another double field. I would like format this column to...
5
by: jonm4102 | last post by:
I'm trying to calculate the median of some numerical data. The data can only be found in a query (henceforth query 1) field I previously made, and I would prefer to calculate the median in a new...
8
by: chrisdavis | last post by:
I'm trying to filter by query or put those values in a distinct query in a where clause in some sort of list that it goes through but NOT at the same time. Example: ROW1 ROW2 ROW3 ROW4 ,...
2
by: hunslair | last post by:
This is a really basic question. I am taking a teach yourself beginners course on Access 2003 and have run into a road block on one practice. In a select query, I have created a simple calculation...
3
by: shill57957 | last post by:
I have a query: SELECT .AH_TICKNO, Format((.AH_AMOUNT-.AH_TRNAMT)/.AH_AMOUNT,"Percent") AS DIF INTO FROM ; I dont want to format as a percent, I want it to go into the table with 4 decimal...
4
by: plaguna | last post by:
Every time I calculate numbers to get a percent format type in a query It gives me a big number. For instance: 7689.43% instead of 76.89%. I tried every possibility in the Property Sheet and It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.