How to convert text string to number in Access function

heslopwv

New Member
Joined
Nov 17, 2008
Messages
2
Within Access 2007, I am querying on two tables where an ID number is stored as a text field in one table, and a number field in the second table. In order to connect and query on them both, I need them to be similar. In addition, converting them to number would allow the leading zeros to fall off as well. I would assume there is a function that does this, but I have not found one to work correctly. I appreciate any help anyone can give.

*I realize that I can change the tables (make table) manually, but I want to include a query in a macro to automate the step.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to the Board!

Try using the VAL function, i.e.

ConvertedID: Val([FieldName])
 
Upvote 0
Yeah....that was it. I had actually tried it, but was wrong in how I was doing an update qry rather than thinking I had the wrong function. Thank you for the very quick response!!!
 
Upvote 0

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top