Replace text field values

  • Thread starter Thread starter M. Jackman
  • Start date Start date
M

M. Jackman

I used to work with RPG/400 which has a command that works
like this:

MOVEL moves the value of the first field to the leftmost
part of the value of the second field
MOVER moves the value of the first field to the rightmost
part of the value of the second field

Example:
Command Field1 Field2 Result
MOVEL 123 00000 12300
MOVER 123 00000 00123

How can I achieve this same results with Access and VBA?
Is there a similar function in MS Access or VB??
 
M. Jackman said:
I used to work with RPG/400 which has a command that works
like this:

MOVEL moves the value of the first field to the leftmost
part of the value of the second field
MOVER moves the value of the first field to the rightmost
part of the value of the second field

Example:
Command Field1 Field2 Result
MOVEL 123 00000 12300
MOVER 123 00000 00123

How can I achieve this same results with Access and VBA?
Is there a similar function in MS Access or VB??

How about:

' Equivalent of MOVEL
Result = Left(Field1 & Field2, Len(Field2))

' Equivalent of MOVER
Result = Right(Field2 & Field1, Len(Field2))
 
perfect!! thank you!!
-----Original Message-----


How about:

' Equivalent of MOVEL
Result = Left(Field1 & Field2, Len(Field2))

' Equivalent of MOVER
Result = Right(Field2 & Field1, Len(Field2))

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top