PDA

View Full Version : String - Number - String



john-86
03-10-2006, 07:46 AM
Hello all, I just wanted to see if my understanding of something was correct.

In one of my tables I have a numeric field which I need to format. I was wondering if you can either use the '?' wildcard whilst checking numbers or if it were possible to convert a number into a string and back again.

I understand the Str() function allows you to convert a number into a string. Does the CLng() function allow you to convert back?

Thanks for your time,
John

PS
After developing my application for a few weeks now (:banghead: ) I have the utmost respect for you experts out there!!!

Norie
03-10-2006, 10:47 AM
John

Could you give an example?

john-86
03-13-2006, 03:20 AM
I will do my best to explain although it may be hard to follow if you don't have much knowledge of geography. I'm using a program called ArcGIS (GIS - Geographical Information Systems) to produce point data & extract their full grid references.

When I take this table into Access I want to format the grid reference (held in two different fields - eastings & northings) into a string so I may use the Mid$ function to check if the two numbers are prefixed with a number giving the National Grid Reference letters. Then once I've check for this I need to convert the strings back into numbers so they can go in another table within Access.

It's quite a complex problem. Any function that'd allow me to turn a string comprised of numerical characters into an integer would do the trick.

Thanks for your time,
John

john-86
03-13-2006, 04:53 AM
Thanks for your interest Norie, but I've discovered the CLng() function returns a long from a string.