split a variable or extract part of it?

L

Lee

I am currently almost at the end of a project producing a
database system for a company but I am stuck on one thing.
The system holds records for jobs the company has done and
each has a job number (202xxx for starting in 2002 etc).

I need code to simply extract the first 3 digits of the
variable so that I can figure out the path to the file. Is
there a way to split the variable or to extract just the
first 3 digits etc...

Many many thanks!!!
 
L

Lee

Many thanks! perfect, exactly what i needed!

-----Original Message-----

Look up the function word 'Left' in the help files. Your
code will loko something like this:

Dim strIn As String
Dim strOut As String
strIn = "Test"
strOut = Left(strIn, 3)

Realted function would be 'Right' to start from the other
side and 'Mid' to start somewhere in the middle.
-Cameron Sutherland

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top