Number To Text

Sep 19, 2007

again maybe a simple question...

How to convert a numeric field to a textfield.
In Crystal reports quite easy (totext([fieldname]), but don't know how to write in (good) SQL

thanks in advance

View Replies


ADVERTISEMENT

Number Fields In Text To Number Field, Formula For Fiscal Year

Nov 26, 2004

Date of Birth (DOB) field etc. in one program are text - how do I make another file with the same data into number fields for Date of Birth field etc? When I copy data to file that has number fields the 09252004 is changed to 9252004. Can I get reports with the correct Date of Birth in them by moving data from text file to number file?

There is data entered monthly in file and formula has been set up for January, February etc as ---quarter: Int(([month]-1)/3)+1. I would like formula for the fiscal year for April to be counted as month 1, May - month 2, June as month 3, July as month 4, August as month 5, Sept as month 6, October as month 7, Nov as month 8, Dec as month 9, Jan as month 10, Feb as month 11 and March as month 12.

Thank you

View 6 Replies View Related

Forms :: Add A Name To Text 1 Automatically Set Number To Text 2

Feb 14, 2014

I want 2 text , when I add a name to text 1 automatically set number to text 2 (Random),

View 3 Replies View Related

Formatting Text-number-text

Jan 10, 2007

Hi all.

I have text field with mask:

XXXXX-X
(x are digits), for example - 401-1, 401-2...

I need find field with text beginning 401 and max of last symbol. Last symbol +1, then again convert to text field. For example:
for example 401-1, 401-2,401-3 - must find 401-3 , then 3+1=4 and 401-4 format again to text.

Please, help me with formatting.
Thank You in advance.

View 5 Replies View Related

Number To Text?!?!

Jun 6, 2007

Hey,

I have a small question. There is a table that I am trying to use that houses product numbers, the only problem is that those product numbers start with a '0' but the '0' got deleted because the numbers are housed in a number defined field. If I change the table properties to text, is there a way I can add a leading '0' infront of every existing product number?

Thanks,
Viperstingray

View 2 Replies View Related

I Need To Add A Text To A Number Field

Jul 14, 2005

I'd like to take a branch number field, let's assume it is "223" and change it to "223 No Com". Is there a way to add the "No Com" on the end of it like that?

View 5 Replies View Related

Convert Text To Number

Aug 2, 2005

I have a table with the following fields:
Tool Text
Tool_ID Text
Description Text

The Tool_ID field holds a number if the tool provides a tool id. However, if the tool doesn't provide a tool id, the text "No tool ID given" is automatically placed into the field. Therefore, it needs to remain a text field for this reason and others that are too long to go into.
Anyway, I created a query that pulls only one specific tool which always provides a tool ID. Therefore, the results of my query will always have a number in the text field "Tool_ID".

Question: Is there a way to convert the text field to a number field within the query?

Thanks in advance!
~ Greg

View 4 Replies View Related

Search For A Number Not A Text, SQL

Aug 12, 2005

I have a form with four combo box that will search for a record, as follow:

Field Name "Printer" , DataType "Text"
Field Name Month" , DataType "Text"
Field Name "Year" , DataType "Number"
Field Name "Day" , DataType "Number"

code for Find Record Button:


If Not IsNull(ID) And Trim(ID) <> "" Then
StrSQL = StrSQL & " And [Id] = " & [ID]
End If

If Not IsNull([txtname]) And Trim([txtname]) <> "" Then
If InStr([txtname], "*") = 0 Then

StrSQL = StrSQL & " And [Name] = '" & [txtname] & "'"
Else
StrSQL = StrSQL & " And [Name] like '" & [txtname] & "'"
End If
End If

'================================'


If Not IsNull([txtyear]) And Trim([txtyear]) <> "" Then

If InStr([txtyear], "*") = 0 Then

StrSQL = StrSQL & " And [Year] = '" & [txtyear] & "'"
Else
StrSQL = StrSQL & " And [Year] like '" & [txtyear] & "'"
End If

End If

'================================'


If Not IsNull([txtmonth]) And Trim([txtmonth]) <> "" Then

If InStr([txtmonth], "*") = 0 Then

StrSQL = StrSQL & " And [Month] = '" & [txtmonth] & "'"
Else
StrSQL = StrSQL & " And [Month] like '" & [txtmonth] & "'"
End If

End If

'================================'


If Not IsNull([txtday]) And Trim([txtday]) <> "" Then

If InStr([txtday], "*") = 0 Then
StrSQL = StrSQL & " And [Day] = '" & [txtday] & "'"
Else
StrSQL = StrSQL & " And [Day] like '" & [txtday] & "'"
End If

End If

'================================'


This is only a part of the code, I have a problem with year and day since they are numbers not text I was told that i cant use this line:

StrSQL = StrSQL & " And [Month] like '" & [txtmonth] & "'"

I was told that there is no need to use "like", am not really sure how to do it, any help will be appreciated.

Thanks.

View 2 Replies View Related

Change A Number To Text?

Apr 12, 2007

Is it possible to actually change a number to text? I cant seem to figure out how. I have 2 proprietary systems one uses a number and one uses text for the same item. I know how to change the text to a number however the more efficient way for me to do this is the other way around. Its the differnce from 300 to 400 record change vs 4M. Any help would be great thx.

View 2 Replies View Related

Nz Returning Text Instead Of Number

May 24, 2007

hi all,

here's the dealio... i need perform an aggregate funtion off of a certain field, but it contains null values. i tried using Nz and an Iif IS NULL statement to get rid of the nulls. but both methods return the values as text. obviously, i can't get an Avg of these text values.

here's the two methods i tried:

Format(IIf([AvailTab].[Per00] Is Null,"1",[AvailTab].[Per00]),"Percent") AS Per01Test

Format(Nz([AvailTab].[Per00],"1"),"Percent") AS Per00

how can i return the data as a number?

thanks,
mj

View 4 Replies View Related

Asking A Text Box To Return A Number

Jan 28, 2005

Hi guys and gals,
I have compiled a very simple database to track staff and training audit requirements for my company.
I am 57 thick as 2 short planks and need some help please.
I wish to ask a text box called "Score" to return a number 2 if a yes/No box is "NO" and a number "1" if the Yes/No box is "YES".
I have looked at the help sections of Access and thought maybe an "IIf" statment in the Validation Rule section of the "Score" box might do the trick.
However, i haven't got a clue as to what the coding should be written like.
Can anybody help me please.

Basically i want to say
"If YES/NO = NO then SCORE = 2 but If YES/NO = YES then SCORE = 1"
Told you i was thick

View 3 Replies View Related

Differentiating Between Text And Number

Jun 17, 2005

I have a peculiar problem:
I have a form for filling in details of drawings received. one of the controls is 'Drawing Number'. The drawing number is usually an alpha-numberic 'number' like AC234 or MC2 or TPD-00113, with no generalizable format.

once the number is put in and saved, I would like VB to automatically offer to save the next number, for example, AC235 or MC3 or TPD-00114. I want to do this because usually there are hundreds of sequential drawings and I want to reduce the risk of typos as well as make the input easy.

I want VB to be able to take the number, split it into alphabets and numbers, add 1 to the number, put it back with the same alphabet and re-populate the text box.

I tried doing that using last two digits (right(me.txtbx, 2)) but that method is full of problems. For example, it goes from MC009 to MC0010 instead of MC010 and so on.

I will be grateful for any help that I can get.

View 7 Replies View Related

Switching To Number From Text

Jul 1, 2013

I'm having trouble swicthing the data type of my numbers.When I am importing the table from another database it enters as a text.When I then go to table design and try to switch it to number, it removes the decimals and switches the value to something ALOT higher.how to fix this so that it just enters as a number with the same value?

View 2 Replies View Related

Limiting The Number Of Characters In A Text Box

Jun 13, 2007

I Have Created A Client Reference Allocation Screen Which Makes The Clients Reference From Details In A Number Of Text Boxes.

For Example:

Client Number: 0010, Forename: Andrew, Surname: Bloggs, Year: 2007,
Occupation: Driver.

Client Reference = 0010ab-dr07

I Have Copied The Text Boxes So The Information Is Automatically Displayed To Create The Client Reference, But Rather Than Shortening The Copied Text Boxes To Show Only The First Few Characters Is There A Way Of Limiting The Number Of Characters Shown In The Copied Text Boxes??

Matt

View 4 Replies View Related

Text & Number Sorting In A Table

May 24, 2005

I have a table where my primary Key is of a text type, the key is made up of a single letter then a number... ie.

R1
R2
R3
...
R30
R31
..R100

etc.

This is an indefinate table and will go as high as I need to

Unfortunately I can't sort this table because if its mixture of both text and numerical characters, can anyone provide any assistance?

Thanks!

View 5 Replies View Related

Format A Number As A Text In A Query

Apr 5, 2007

Hello,
I have a text file I'm querying that stores a field as a text.
ComponentID:0000000242

I'm inserting this data into a table that stores this value as a number. Thus truncating the leading zeros.
ComponentID:242

I would like to create a query on the table using an InnerJoin on the text file column:ComponentID:0000000242 and the table column:ComponentID:242 as the unique identifier. Doing this join gives a case error because of the different data types.

Can format ComponentID using a query so it reads from my table as 0000000242 and do an InnerJoin to the text file. In vb
String= Format(242, "0000000000")
But I'm finding it difficult to get the query to format this correctly.

Unfortunately, i'm unable to change the column data type in the table structure and am looking for a work around. Is this even possible? Any ideas?

Thanks.

View 1 Replies View Related

Convert Number To Text In Query

Dec 1, 2007

I want to have a question in my query that does not get answered by date but by a concatenated field named "MonthYearPeriod".

We always forget how many days in a month. But we remember the month and year. So for say a Sales Range of Nov 2006 to Oct 2007, we prefer to respond to the criteria question as: 11-2006 and then 10-2007.

FiscalMonth and FiscalYear are both Long Integer number fields in the table.

Query field concatenated:
MonthYearPeriod: [FiscalMonth] & "-" & [FiscalYear]

criteria line:
Between [Month-Year START DATE] And [Month-Year END DATE]

However, i get other crazy time periods. So this is not working. Maybe on the Query field box, I need extra coding to convert the number to text?

I assume that a Dash sign between the month and year are fine.
Thanks

View 5 Replies View Related

Formating Number Within Text String

Oct 6, 2006

looked around but could not find the answer.
i have a text box that might or might not contain text and number data. an example of the data in the text box might be;

bob roberts, 17/03/2006, aged 23

what i would like is some VB code that would:

check anywhere in the text box for number characters that are 8 characters in length with a comma at the end [12345678,] as in the first example. and change this to 12/34/5678,

bob roberts, 17032006, aged 23
would become 'on lost focus'
bob roberts, 17/03/2006, aged 23

anybody any idea how to do this?

thanks

View 2 Replies View Related

Format Number Within Text String

Oct 19, 2006

hi
I'm no expert and can't seem to find what i'm looking for.

i have data i enter into a text box. the data might be in the format

"name"
OR
"name, date, age"
OR
"name, date"

if on the second or third example above i entered the data like shown below how would i VB code the afterupdate to do this:

turn
David Roberts, 12122006
to
David Roberts, 12/12/2006

OR turn
David Roberts, 12122006, 56
to
David Roberts, 12/12/2006, aged 56

any ideas??
I'm working along the lines of instr, mid, etc. but i'm not sure of the correct procedure
thanks in advance

View 5 Replies View Related

Subform Shows A Number, Not Text...

Dec 8, 2006

It's my understanding of general database practice that an Autonumber field should be used as a primary key in normalisation tables. I realise my understanding could be wrong, and I'm quite happy to change that practice if need be.

I have my normalisation tables. For the most part these consist of an Autonumber field ([UID]) as the primary key, then an indexed, no duplicates text field with the normalisation data. For this case, we'll say it's a list of departments ([DepartmentID]).

I have a form for entering users. Again, the PK is an autonumber field. I used a wizard to create a combo box. I selected the fact that I want to store the value in [DepartmentID], NOT [UID].

This works fine, I can add my users and the combo boxes work, although I had to change the bound column to 2, as 1 is selected by default although it is [UID].

I then created a subform based on a query of all users. This subform is not bound to the main form in any way, it simply shows the result of the query.

When entering users, upon saving a record, the form is updated and the new user shown in the subform. Great, apart from "txtDepartment" in the subform showing [UID], and not [DepartmentID] as stipulated.

I have a horrible feeling this is to do with [UID] being my PK, but I'd like someone to tell me I'm wrong. I can quite happily remove the autonumber field [UID] and make the unique [DepartmentID] field the PK, but this just doesn't seem "correct" to me.

Should I do this? Should I have an autonumber field as the PK?

I realise this is more a design theory question than a form problem as such, but anything that clarifies my understanding of correct design practice will help.

EDIT:- I'd also like to say that I did it this way to get away from using the "LOOKUP" field type at table design time, specifically to avoid this very problem of numbers showing up when I want the text there!

View 3 Replies View Related

Queries :: Text To Number Query

May 28, 2013

I have a linked table to Access 2010 which contains tracking numbers for shipments.When I link the spreadsheet to the Table, the FedEx tracking numbers are changed to for example - 9.813842152e+014 instead of 981384215196229. Is there anyway to change these back to its original format? I was thinking of creating a query where I could use Conversion Function, but it kept giving me error. Please note that both the UPS Tracking and FedEx tracking are in the same field.

View 8 Replies View Related

Tables :: When To Use Text Vs Number For Field

Jan 7, 2013

I randomly read on another website that your field type in a table should be 'text' unless you're doing math on the number'. Is this true?

View 14 Replies View Related

Forms :: Text Field To Number

Jun 4, 2013

I'm scanning serial numbers in a field, but the results always start with an S...like S123456789 , S107432567 etc.. how can I eliminate the S and make this field numeric?Access 2007 being used.

View 4 Replies View Related

General :: Text As A Number With Commas

Sep 17, 2014

I have several fields that were set up as text fields since the numbers would never be used for calculation. But now my users want to see 100,000 instead of 100000. I have looked everywhere for an answer but do not know if it is possible without retyping the data. The text or rather the numbers that are text can be from anywhere of 1 to 1,000,000 plus. They are just used to show population figures. How to do this with formatting?

View 9 Replies View Related

Forms :: Multiply A Text Box Value By A Number

Sep 10, 2013

I have a text box in a form that is producing a number from the query that the form is based on.In another Text Box i want to show the Value of the first Text Box multiplied by 3 because i am going to hide the first text box to only show the calculated number.

At the moment i have this in the control source of the text box [CountOfJobID]*3 but all i am getting is #####...I have set the format of the text box to General Number.

View 5 Replies View Related

Modules & VBA :: Text To Number Conversion

Sep 12, 2013

I have some vba that dump an access table into a recordset and then into an excel spreadsheet. When the data is exported Columns I:Q (which are numbers) appear as text (with the green triangle in the upper left corner). I have a pivot table that refreshed however it can't do anything with text.

I've tried just to change the cells format and it doesn't work. The only way I've been able to change it to a number is to click on the green triangle and select "Convert to Number" How can I do this via VBA? The # of rows will change but the columns will always stay the same.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved