substring

G

guy

I need to substring a 12 character numeric field into 3 -
4 character numeric fields, I have tried several different
ways but I keep getting an error "Undefind function
in 'Substring' expression".

Thanks
 
B

Brian Camire

You might use the Left, Right, and/or Mid functions.

For example, the expression

Left([Your Field],4)

will return the four leftmost characters in the field named "Your Field",

Right([Your Field],4)

will return the four rightmost characters, and

Mid([Your Field],5,4)

will return the four characters starting with the fifth one.

Check the help for details. If you're using Access 2000, you'll need to
view the help from the Microsoft Visual
Basic window (Tools, Macro, Visual Basic Editor) to see the topic for these
function.
 

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