Breaking up a phone number field into seperate fields 
Author Message
 Breaking up a phone number field into seperate fields

Hello,
    What is the command to get like from character 4 thru 6, I did a left to
get the first 3 digets butneed
the rest
agahtion

Do Until DataCommand1.EOF
            IDD = DataCommand1("PHONE")
            acidd = Left(IDD, 3)
            SUFID = SUBSTR(IDD, 4, 3)
            DataCommand1.MoveNext
Loop



Fri, 04 Apr 2003 03:00:00 GMT  
 Breaking up a phone number field into seperate fields
The function is Mid(), as in

    SUFID = Mid(IDD, 4, 3)

--

Dirk Goldgar
(remove NOSPAM from reply address)


Quote:
> Hello,
>     What is the command to get like from character 4 thru 6, I did a left
to
> get the first 3 digets butneed
> the rest
> agahtion

> Do Until DataCommand1.EOF
>             IDD = DataCommand1("PHONE")
>             acidd = Left(IDD, 3)
>             SUFID = SUBSTR(IDD, 4, 3)
>             DataCommand1.MoveNext
> Loop



Fri, 04 Apr 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to seperate MM/DD/YY into seperate fields in access

2. Reading a field and using that field to place a number in another field

3. Input Masking for phone number fields

4. Field Chooser Phone n Selector/ed Field Behavior

5. Breaking a field using textstream at certain column number (73)

6. When you create a field each field has a id number (field number) (how can you edit this number)

7. Convert number field to text field.

8. Concatenating a Text Field and a Number Field

9. Seperating First, Middle, Last Name from one field

10. Splitting strings into seperate fields

11. Seperating Email fields

12. Name a file from 3 seperate fields

 

 
Powered by phpBB® Forum Software