Update query for dummy's

M

Mike

Hi -

I'm trying to truncate a field using the update query -
but can't get it to work correctly. I'm trying to go
from M12345 to 12345 - eliminating the M.

Based on the Help - I'm entering the following expression
in the "update to:" field

Right([Job Number],1)


Any guidance would be greatly appreciated.
 
L

lbrinkman

Use the MID() function. Look it up in Access HELP.
x = Mid("YourField", 2)
The MID() function return a string/variant, so you can change it to an
integer
via CInt() or to a long integer via CLng() is you want to sort it as a
number.
---Phil Szlyk
 
G

Guest

Thanks for the reply - and before I throw the computer
out the window, I figured I would pass along the error
message that I'm getting:

Function isn't available in expressions in query
expression 'mid([Job_Number],2)'

I've tried it in every possible way, shape or form. I
must be doing something wrong. Any ideas?

Thanks for your help.

-----Original Message-----
Use the MID() function. Look it up in Access HELP.
x = Mid("YourField", 2)
The MID() function return a string/variant, so you can change it to an
integer
via CInt() or to a long integer via CLng() is you want to sort it as a
number.
---Phil Szlyk


Hi -

I'm trying to truncate a field using the update query -
but can't get it to work correctly. I'm trying to go
from M12345 to 12345 - eliminating the M.

Based on the Help - I'm entering the following expression
in the "update to:" field

Right([Job Number],1)


Any guidance would be greatly appreciated.


.
 

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

Similar Threads

Access Query problem 1
Update Query problem 7
Can't create a report from my query in Access 1
Dmax in an Update Query 1
Update Query 3
Update Query 5
Convert Text field to Date field within existing database 6
Using Case statements 10

Top