Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Related combos - don't work!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01519661
Message ID:
01519664
Vues:
36
>Hi everybody,
>
>This should be very simple, but for some reason doesn't work for me.
>
>I have two combos on the form, one is Departments, another is Categories.
>
>I want Categories to depend on Departments.
>
>So, this is what I tried to set as Categories combo rowsource, but when I try to select records from Categories I got variable cDepartment not found:
>
>with thisform.cboDepartments
>   .rowsourcetype = 2
>   .rowsource = 'csrDepartments'
>   .BoundColumn = 2
>   .listindex = 1
>endwith
>with thisform.cboCategories
>   .rowsourcetype = 3
>   .rowsource = "select * from csrCategories where department = SPACE(10) or department = ?m.cDepartment into cursor csrCat"
>   .listindex = 1
>   .BoundColumn = 2
>endwith
>
>In department's Interactive Change I set this private variable and requery the combo. Only when I touch categories combo I got an error.
>
>I tried originally using thisform.cSelDepartment instead of department = ?m.cDepartment, but it also didn't work - I was getting an error I can not use a method - something along these lines.
>
>I guess I will have with re-building the combo's source every time, e.g. rowsource = '', select, requery.
>
>What do you think?
>
>Thanks in advance.

What about using a parameterized view?
ICQ 10556 (ya), 254117
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform