If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Use query to change Text to Number
Is there way to change a field from numbers stored as text to numbers,
without deleting anything that is actual text? I would like to achieve the same results as the GENERAL format in excel. |
#2
|
|||
|
|||
Use query to change Text to Number
Dear dcozzi:
Assiming the text is always a valid number, convert it. There are different conversions depending on the type of numeric value represented, such as CInt, CLng, CDbl, CCur. Do this in a calculated column. Tom Ellison "dcozzi" wrote in message ... Is there way to change a field from numbers stored as text to numbers, without deleting anything that is actual text? I would like to achieve the same results as the GENERAL format in excel. |
#3
|
|||
|
|||
Use query to change Text to Number
If I understand right, the answer is no. Excel has no notion of a data
type for a column or field, while Access tables have strong data types. The only thing you can store in a text field is text (even if it's a string of numbers), and the only thing you can store in a numeric field is a number. But you can probably use an expression like this IIF(IsNumeric([XXX]), Val(Nz([XXX], "")), Null) to return a numeric value from a text field that contains a number, and Null if the field contains anything else. On Fri, 10 Mar 2006 13:36:30 -0800, dcozzi wrote: Is there way to change a field from numbers stored as text to numbers, without deleting anything that is actual text? I would like to achieve the same results as the GENERAL format in excel. -- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add New Field to DB | Karen | Database Design | 7 | October 19th, 2005 08:03 PM |
Combo Box (1st) Populating Text Box (2nd) Field | AccessRookie | Using Forms | 1 | April 6th, 2005 11:37 PM |
Help with design | Ronnie | Database Design | 6 | March 12th, 2005 02:53 PM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |