Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 To: sami bissani
  Where is sami bissani?
 Doha
 Qatar
 sami bissani
Subject: RE: multiple combo boxes
Thread ID: 192938 Message ID: 192940 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Forms
Date: Saturday, September 6, 2008 9:33:34 AM         
   



> hey guys,
>
> i created a combo box using the way of Mr. Anil Sharma in his reply:
>
> **************
> just create a table with Name,QueryFile bound your combobox with that table. by rowsourcetype =6 and rowsource= "table.name,queryfile" and in the lostfocus event u can just run your selected query file like that
>
> do (table.queryfile)
> **************
>
> using this way, i can run my queries or programs smoothly, but, now i need to make multiple combo boxes in my form, and i can't use this way, because i cannot use many table at the same time to get data from them. so my question is:
> is there a trick that allows me to take data from many table ? or can i create queries to show different data in the combo boxes but all from the same table ?
>
> hope i didn't confuse u guys :)
>
> your help is highly appreciated

just drop comboboxes on form and in your form's init event write this

select your_table
scan for
thisform.combo1.AddListItem( feildname,id_field)
endscan

select your_table
scan for
thisform.combo2.AddListItem( feildname,id_field)
endscan

and so on!

Anil
(Fox is the solution for almost everything!!)

ENTIRE THREAD

multiple combo boxes Posted by sami bissani @ 9/6/2008 9:17:53 AM
RE: multiple combo boxes Posted by Anil Sharma @ 9/6/2008 9:33:34 AM
RE: multiple combo boxes Posted by sami bissani @ 9/6/2008 10:14:14 AM
RE: multiple combo boxes Posted by Anil Sharma @ 9/6/2008 10:22:05 AM
RE: multiple combo boxes Posted by sami bissani @ 9/6/2008 10:29:50 AM
RE: multiple combo boxes Posted by Glenn Villar @ 9/6/2008 9:38:32 AM
RE: multiple combo boxes Posted by sami bissani @ 9/6/2008 10:02:03 AM
RE: multiple combo boxes Posted by Glenn Villar @ 9/6/2008 10:04:19 AM
RE: multiple combo boxes Posted by sami bissani @ 9/6/2008 10:20:23 AM
RE: multiple combo boxes Posted by Glenn Villar @ 9/6/2008 10:22:34 AM
RE: multiple combo boxes Posted by sami bissani @ 9/6/2008 10:27:31 AM
RE: multiple combo boxes Posted by Glenn Villar @ 9/6/2008 10:29:03 AM
RE: multiple combo boxes Posted by Anil Sharma @ 9/6/2008 10:33:52 AM
RE: multiple combo boxes Posted by sami bissani @ 9/6/2008 12:27:19 PM
RE: multiple combo boxes Posted by Stefan Wuebbe @ 9/6/2008 10:36:41 AM
RE: multiple combo boxes Posted by Glenn Villar @ 9/6/2008 10:47:51 AM
RE: multiple combo boxes Posted by Stefan Wuebbe @ 9/6/2008 11:19:00 AM
RE: multiple combo boxes Posted by Glenn Villar @ 9/7/2008 8:53:17 AM