Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select with listbox - HELP!!!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00106414
Message ID:
00106420
Vues:
29
Sheena,

Maybe this was a typo in the post, but according to your case statement, you will never get a course7 because the case for course6 and course7 are the same. Therefore it will always take course6 since it is first. Don't know if that's your problem or not, but you should probably look at it a bit more carefully.

HTH

>Hello:
>
>I'm debugging some code that displays a list of job industries into a listbox based on a certain code criteria . This is done using a CASE statement that takes the code from one table that someone has enteree and compares it to the table of codes and descriptions. The case selects codes for each level i,e, 10000000 for 1st level, 11000000 for 2nd level and so on. Everything works fine except my last level
>that have codes that only have 1 zero i.e. 63321310, they display ok but won't allow me to doubleclick them to appear in my textbox as the others do. Am I missing something painfully obvious? Any help would be appreciated.
>
>
>
>
>WITH thisform.List1
> .BoundColumn = 2
> .columncount = 2
> .columnwidths = "570,0"
> .ControlSource = "new_course"
> .RowSourceType = 3
>
>
>
>Do CASE
> CASE val(right(new_course,7)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,7) = '0';
> into cursor course1"
> select course1
> CASE val(right(new_course,6)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,7) = '0' ;
> into cursor course1"
> select course1
> CASE val(right(new_course,5)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,6) = '0';
> and left(new_course,1) = left(code,1)into cursor course2"
> select course2
> CASE val(right(new_course,4)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,5) = '0';
> and left(new_course,2) = left(code,2)into cursor course3"
> select course3
> CASE val(right(new_course,3)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,4) = '0';
> and left(new_course,3) = left(code,3)into cursor course4"
> select course4
> CASE val(right(new_course,2)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,3) = '0';
> and left(new_course,4) = left(code,4)into cursor course5"
> select course5
>
> CASE val(right(new_course,1)) = 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,2) = '0';
> and left(new_course,5) = left(code,5) into cursor course6"
> select course6
>
> CASE val(right(new_course,1))= 0
> .RowSource = "select desc_e,code from studies ;
> where right(code,1) = '0';
> and left(new_course,6) = left(code,6)into cursor course7"
> select course7
>
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform