Help with Mid and Spaces

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

I have the flowing > Fld1: Mid([Description],InStrRev([Description],"#")+1,30)


The data looks like this:
DWG# Z12565786S
DWG #ZSD456789
DWG # Z3567894-DS

As you can see depending on which way the wind blew that day the user may
type with a space or without before or after the #. What need is just the
drawing number itself which is after the #.

What I get with the above is the complete drawing number, but it may have a
space before the number depending on the how the data was typed.

What can I do?
Matt
 
T

Tom Lake

mattc66 via AccessMonster.com said:
I have the flowing > Fld1:
Mid([Description],InStrRev([Description],"#")+1,30)


The data looks like this:
DWG# Z12565786S
DWG #ZSD456789
DWG # Z3567894-DS

As you can see depending on which way the wind blew that day the user may
type with a space or without before or after the #. What need is just the
drawing number itself which is after the #.

What I get with the above is the complete drawing number, but it may have
a
space before the number depending on the how the data was typed.

What can I do?
Matt

Trim(Mid("DWG # Z3567894-DS", Instr("DWG # Z3567894-DS", "#") + 1))

Tom Lake
 
T

Tom Lake

I have the flowing > Fld1:
Mid([Description],InStrRev([Description],"#")+1,30)


The data looks like this:
DWG# Z12565786S
DWG #ZSD456789
DWG # Z3567894-DS

As you can see depending on which way the wind blew that day the user may
type with a space or without before or after the #. What need is just the
drawing number itself which is after the #.

What I get with the above is the complete drawing number, but it may have
a
space before the number depending on the how the data was typed.

What can I do?
Matt

Fld1: Trim(Mid([Description], Instr(Description], "#") + 1))

Tom Lake
 
Top