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

Format Numbers in Query Text Field

doma23
107 100+
I have a field in a query that contains numbers and text (text field):
Expand|Select|Wrap|Line Numbers
  1. C/R: IIf([Revenues]<=0;"n/m";[Costs]/[Revenues])
I need to export this query to Excel in a number format, so I can easily manipulate the data later.
If I put null instead of "n/m" it works nicely because it remains the number format, but I need to automatize my application, so I need to have "n/m" in these fields.

I know it can be done with Excel Automation, but it's rather complicated, is there any other way?
Jun 11 '10 #1
1 2290
jimatqsi
1,271 Expert 1GB
@doma23
I did something like this recently. I think the solution for me was to put some code in Access to format the cell after I knew what the value was. There was something less than spectacular about the result, I forget now exactly what ... I think it had something to do with the the Excel sheet launching automatically and being locked for update until I closed the Access program. But I found I could apply format changes to each cell, so I was happy.

Jim
Jun 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
2
by: Abhishek | last post by:
All, I am trying to export an access table to a text file. This table has a numeric field (Double) and when I export it to a text file, I see the number in the scientific format. MS-Access...
3
by: Zheve | last post by:
Help please, I want to write a query to delete spaces and other various between numbers (which is set as text field due to the data that is put in) as follows: Currently as: 0-9-123 4567 OR...
4
by: justin tyme | last post by:
Hello Experts! I would like to combine (which may not be the correct technical term) two text fields from the same table in a query. Specifically, text field A and text field B are both lists of...
1
by: Beckster6701 | last post by:
I have a MSAccess database that is linked to a SQL server. I cannot change the SQL server datatype as I am not the only one that uses the database. I'm trying to convert the text field to a valid...
8
by: clarencelai | last post by:
Hi.. I need to query a TEXT field in an ODBC table (Oracle) that contained numbers. 1) How can I sort those numbers in numeric order? Currently, number 1 ~ 11 is sorted in this order.. 1, 10,...
2
by: henryrhenryr | last post by:
Hi I have the following query: SELECT user_id_pk, first_name, last_name, email FROM users LEFT JOIN status ON user_id_pk=user_id_fk WHERE live='Y' AND (status=1 OR status IS NULL)
1
by: Wayne | last post by:
I'm using the following expression in the query grid to show the Month and Year of the date field "TxtDate": Week: Format(,"ww yy",4) I am grouping the results on this field. Is there a...
8
by: cptuser | last post by:
Hi, I'm a novice at this. I've managed to learn by example and come up with this Javascript code from various examples on the web. Could someone please help me with providing code that will...
4
code green
by: code green | last post by:
Data Protection etc.... shouldn't be there. How do I find credit card numbers buried amongst any length of text. Googling finds credit card validation claims, which are too complicated. I need...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.