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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combox side by side

Status
Not open for further replies.

vfpgolfer

Programmer
Oct 16, 2004
76
US
I have two combo boxes side by side (boxa and boxb)-
both select data from same table but with different filters
rowsource is 6,fields xx.id,xx.descr

If I select data from boxa then from boxb using the keypress (where I have written code to set filters, requery etc.) - works ok

If I do above then go back to boxa, click the downarrow (where I have put set filters and requery - also put set filter and requery on downclick) - the contents of the pulldown list in boxa now contain the boxb values. If I use my keypress (F5) then filters get set - seems to be ignoring the downclick

This is in VFP9 -
 

Use SQL statements into a cursor with different names for each combo, rather than the same table with different filters. Or if you want to use a table, load it twice in the dataenviroment (which will cause it to have a slightly different name than the first one), and filter the appropriate version of the table.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I just got it working by doing this in the dropdown

SET FILTER TO TYPE = 'X' AND ALLTRIM(tasklaw)=ALLTRIM(client.tasklaw)
SET ORDER TO TAG taskcode IN DESCR
*this.Requery
WITH THIS
.COLUMNCOUNT = 2
.COLUMNWIDTHS = "30, 180" .ROWSOURCE = "Descr.TASKCODE, Descr"
.REQUERY()
.DISPLAYVALUE = ""
ENDWITH
 

Hopefully you don't have too many records to filter, as this will slow down your application.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top