Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek not working
Message
 
To
03/07/2006 16:04:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01133476
Message ID:
01133642
Views:
10
Tracy,
I ran this code and the first indexseek found a result, but with a bit of investigation it was finding itself. The data in held in views on the form so it updates the table straight away, th eindexseek ran past the first instance of the registration number and found the second. also the code is running in a lost focus event if that is any help. if i try looking for the reg, say "07 D 1" within the application then it will not find it. if i try this in the command window by using
tempvar1 = "07 D 1"
sele NWC
seek tempvar1 order CMA_regno
then it finds it no problem. I am stumped on this i have to say.
~M

>Which finds it if any?
>
>lclregno = UPPER(ALLTRIM(thisform.pgfpageframe1.page4.txtCma_regno.Value))
>SELECT NWC
>WAIT WINDOW "reg is_" + lclregno + "_"
>IF lclregno <> ""
>   WAIT WINDOW "regno variable is not blank"
>   IF !INDEXSEEK(lclregno,.t.,'NWC','CMA_regno')	
>       WAIT WINDOW "Step 1 did not find it."
>       IF !INDEXSEEK(alltrim(lclregno),.t.,'NWC','CMA_regno')
>          WAIT WINDOW "Step 2 did not find it."
>          IF !INDEXSEEK(upper(lclregno),.t.,'NWC','CMA_regno')
>              WAIT WINDOW "Step 3 did not find."
>              IF !INDEXSEEK(upper(alltrim(lclregno)),.t.,'NWC','CMA_regno')
>                 WAIT WINDOW "Verify the tag information"
>                     SELE NWC
>                     =ataginfo(mytags,'NWC')
>                     list MEMORY LIKE mytags
>              ELSE
>                WAIT WINDOW "Found it with upper(alltrim())"
>              ENDIF
>          ELSE
>              WAIT WINDOW "Found it with upper()"
>          ENDIF
>       ELSE
>          WAIT WINDOW "Found it with alltrim()"
>       ENDIF
>   ELSE
>      WAIT WINDOW "Found it with with indexseek()"
>   ENDIF
>ENDIF
>
Go raibh maith agat

~M
Previous
Reply
Map
View

Click here to load this message in the networking platform