Adding number to text field

I have a field [Transaction Number] that is formatted as a text field. The value is 000002. I need to add the number 231955 to the value from a query and have it display 231955.

When I use the formula FormatNumber(CInt([Transaction Number]),0,0,0)+[CurrentTransNumber] in the query I get 2231955.

When I use the formula FormatNumber(CInt([Transaction Number]),0,0,0)+CInt([CurrentTransNumber]) I get a stack overflow error.

How do get it to add and not combine text values?
PetGuyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Gustav BrockConnect With a Mentor CIOCommented:
You could simply use:

Format(Val([Transaction Number]) + Val([CurrentTransNumber]), "000000")

/gustav
0
 
Rey Obrero (Capricorn1)Commented:
change "CInt" to "Clng"
0
 
PetGuyAuthor Commented:
Just what I needed, and fast
0
 
als315Commented:
In query you should be able to sum numeric text values and number without conversions.
[Transaction Number] + 231955 will be equal 231957 if [Transaction Number] equal 000002 or 002
0
 
hnasrCommented:
"need to add the number 231955 to the value from a query and have it display 231955.", where is the effect of value 000002?
0
All Courses

From novice to tech pro — start learning today.