Help with Mid and Spaces

  • Thread starter Thread starter mattc66 via AccessMonster.com
  • Start date 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
 
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
 
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
 

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

Back
Top