Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combos in grids that should depend one of each other
Message
From
16/12/2011 21:38:15
 
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:
01531225
Message ID:
01531249
Views:
64
Naomi,

Can you try to change the RowSource of cboSections and cboRows like so:

Level restricts section selections and section dictates available rows.
   with .colLevels.cboLevels
      .rowsource = ''
      .rowsourcetype = 3  
      .rowsource = "select * from csrAllLevels where LevelID IS NOT NULL order by Descrip into cursor csrBLvls nofilter"
      
      .parent.ControlSource = 'rsHolds.LevelID'
   endwith

   with .colSections.cboSections
      .rowsource = ''
      .rowsourcetype = 3
      .rowsource = "select * from csrAllSections where LevelID = csrBLvls.LevelID order by Descrip into cursor csrSect nofilter"
	  .parent.ControlSource = 'rsHolds.SectionID'
   endwith

 with .colRow.cboRows
      .rowsource = ''
      .rowsourcetype = 3
      .rowsource = "select * from csrAllRows where LevelID = csrBLvls.LevelID and SectionID = csrSect.SectionID order by Row into cursor csrRows nofilter"
      .parent.ControlSource = 'rsHolds.Row'
   endwith
Also, pls requery the affected comboboxes in the Valid events.

HTH
Dennis
Previous
Reply
Map
View

Click here to load this message in the networking platform