Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Related combos - don't work!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01519661
Message ID:
01519664
Views:
34
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform