Left

  • Thread starter Thread starter rollover99 via AccessMonster.com
  • Start date Start date
R

rollover99 via AccessMonster.com

I have searched many threads to try and find an answer. I have a field that
has
many alpanumeric values in it.

Like SO12345 or PO54321

I am trying to get just remove the text from number in a query.
Field1 Field2
SO 12345
PO 54321

I have used this and get the Field1 but I am at a loss for field2

Left(dbo_INVOICE!SALESORDERNUMBER,InStr(dbo_INVOICE!SALESORDERNUMBER,"SO")-1)
 
If the field is always the exact length and format you indicate, then use...


Left([YourField],2)

and

Right([YourField],5)
 
I have searched many threads to try and find an answer. I have a field
that
has
many alpanumeric values in it.

Like SO12345 or PO54321

I am trying to get just remove the text from number in a query.
Field1 Field2
SO 12345
PO 54321

I have used this and get the Field1 but I am at a loss for field2

Left(dbo_INVOICE!SALESORDERNUMBER,InStr(dbo_INVOICE!SALESORDERNUMBER,"SO")-1)

Mid(dbo_INVOICE!SALESORDERNUMBER, 3)

Tom Lake
 
The left command works but the right gives me the last 2 numbers and the
right may change in length.

So pretty much I have the first 2 letters removed into Field1 but Field2
needs to just show everything else and with using

Right([myfield],5) only returns the last 2 numbers.
 
Got it.

Thanks for all your help on this.

The number by default has 8 numbers and I just increased the number to
facilitate this.

End result Right([myfield],8)
 
Back
Top