InStr question 
Author Message
 InStr question

Can I use the InStr command to search a field and extract a ten digit
alpha-numeric value (always beginning with "NA" followed by eight
numbers) and put this number in a new field?  Do I need to use a Loop to
do this searching first for the NA and then verifying that NA is
followed by eight numbers, extract them?

Thanks for any help



Wed, 08 Aug 2001 03:00:00 GMT  
 InStr question

What about:

Dim intPos as integer
intPos=InStr ("NA",strData)
if (intPos>0) Then
    if Len(strData)>=intPos+10)
     if IsNumber (Mid (intPos+2,8))
        strCode=Mid (intPos,10)
    endif
endif

Alberto Borbolla
Microsoft MVP
Tecnologia en Sistemas
MEXICO

(replace "X" to send mail)

    Can I use the InStr command to search a field and extract a ten digit alpha-numeric value (always beginning with "NA" followed by eight numbers) and put this number in a new field?  Do I need to use a Loop to do this searching first for the NA and then verifying that NA is followed by eight numbers, extract them?
    Thanks for any help



Wed, 08 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. instr question

2. Instr() question

3. Multiple Instr function Question ?

4. InStr(cC(i), '/') vs InStr(cC(i), "/")

5. Instr()

6. InStrRev & InStr

7. InStr Help Needed

8. InStr Function Help

9. Instr function

10. Bug in INSTR function

11. Q:Queries that use Instr() to filter record.

 

 
Powered by phpBB® Forum Software