Dividing Text

  • Thread starter Thread starter JOHN SMITH
  • Start date Start date
J

JOHN SMITH

Hi,

I have a text column with this type of information

8899-1
5454-2

How do it setup a function that will create two text fiels

WO Number, WO Sufix
8899 1
5454 2

Thank you All
 
Are you going to store the information as 8899-1, etc.? If so, in a
calculated query field (or an unbound control on a form or report) you could
have =Left([TextField],4) and in another =Right([TextField],1). If you mean
that you want to replace the table field containing 8899-1 with two separate
fields, you could use a Make-table query. Help is pretty clear on that topic.
 
Hi, and thanks for your posting.

I forgot to let you know that the number will vary

like
1234-1
40000-1
12012-9
400300-1




BruceM said:
Are you going to store the information as 8899-1, etc.? If so, in a
calculated query field (or an unbound control on a form or report) you could
have =Left([TextField],4) and in another =Right([TextField],1). If you mean
that you want to replace the table field containing 8899-1 with two separate
fields, you could use a Make-table query. Help is pretty clear on that topic.

JOHN SMITH said:
Hi,

I have a text column with this type of information

8899-1
5454-2

How do it setup a function that will create two text fiels

WO Number, WO Sufix
8899 1
5454 2

Thank you All
 
Hi,

I have a text column with this type of information

8899-1
5454-2

How do it setup a function that will create two text fiels

WO Number, WO Sufix
8899 1
5454 2

Thank you All

WONumber = Left([FullValue],Instr([FullValue],"-")-1)

If the Suffix value is always 1 character:
WOSuffix = Right([FullValue],1)

If the Suffix value can be more than one character:
WOSuffix = Mid([FullValue],Instr([FullValue],"-")+1)
 

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

Parent Task 6
Query by Date 2
Union Query Access 2007 SP2 MSO 7
ActiveCell = " < " 1
Find & replace with text 2
Invisible text box in form 6
Convert Tex to Number 1
Mixing text and alpha in sumproduct arrays 5

Back
Top