Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Grid

Status
Not open for further replies.

DChalom

Programmer
Jun 8, 2002
59
US
I know this is a basic question but...

How do i control a grid by a combo box?
Meaning When the user selects a value from the combo box the grid displays the associated records.



Dorian C. Chalom
 
If you want to use filters, you can set a new filter for each option in the combobox. If you choose this method you will need to move the record pointer for it to take effect. Here is an example:

&&combo box condition 1

select myGridRecordSource &&Select cursor behind grid
Set filter to condition1
goto top
thisform.refresh()


This should be enough to give you a start


-Kevin
 
Hi Dorian.

>> When the user selects a value from the combo box the grid displays the associated records. <<

The easiest way to do this is to create a parameterized view to use as the RecordSource for your grid. Then, you put some code in the Valid() method of the combo boc to REQUERY() the grid's RecordSource using the current value of the combo box as the view parameter.

The on-line help is pretty good on creating parameterized views.




Marcia G. Akins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top