VFP5 ComboBox with RowSourceType = Select Statement 
Author Message
 VFP5 ComboBox with RowSourceType = Select Statement

I have a ComboBox on a Form with the RowSourceType set to 3-SQL
Statement and the RowSource set to "select locname from locations
noconsole nowait"

But on the activation or init of the form or this object, the query
results are still appearing as a browse window.

Am I better to set the RowSourceType and RowSource properties
programmatically in the forms init method and requery the combobox?
Will that eliminate the display of the query results?

Thanks
Paul



Sun, 09 Mar 2003 03:00:00 GMT  
 VFP5 ComboBox with RowSourceType = Select Statement
B
Start by creating a property in the form to contain the results of your
SQL.

SELECT .... INTO THISFORM.aMyArray

If you do not  specify a Table or an Array in your SQL, Fox creates a
cursor and displays it in the current form.

hth

Quote:

> I have a ComboBox on a Form with the RowSourceType set to 3-SQL
> Statement and the RowSource set to "select locname from locations
> noconsole nowait"

> But on the activation or init of the form or this object, the query
> results are still appearing as a browse window.

> Am I better to set the RowSourceType and RowSource properties
> programmatically in the forms init method and requery the combobox?
> Will that eliminate the display of the query results?

> Thanks
> Paul

--
Shar Feldheim
PC Software,INC - Dpartement Amrican, le Prsident d'honneur
<<Quand le singe monte en haut du mat, on lui voit les fesses>>
Visual Foxpro Development -
Minneapolis, Minnesota USA -
***************************************************
   Web Site: <http://www.threedub.com>
***************************************************

***************************************************


Sun, 09 Mar 2003 03:00:00 GMT  
 VFP5 ComboBox with RowSourceType = Select Statement

Quote:

> I have a ComboBox on a Form with the RowSourceType set to 3-SQL
> Statement and the RowSource set to "select locname from locations
> noconsole nowait"

> But on the activation or init of the form or this object, the query
> results are still appearing as a browse window.

> Am I better to set the RowSourceType and RowSource properties
> programmatically in the forms init method and requery the combobox?
> Will that eliminate the display of the query results?

The most popular approach is to select it into a cursor
that you never use:

  SELECT locname INTO CURSOR locCurs FROM locations

I use this approach every time I use a SQL SELECT as the
RowSource (or RecordSource).

-- TRW
_______________________________________
My e-mail:  t r w 7

_______________________________________



Sun, 09 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ComboBox: RowSourceType = Array

2. Changing RowSourceType and RowSource of a ComboBox

3. VFP 5.0 ComboBox RowSourceType =Array ????

4. combobox and rowsourcetype error

5. ComboBox with RowSource=SQL Statement popping up Browse (data) window

6. Theoretical Maximum Length on SELECT Statement

7. SQL - Select Statement and SUM

8. Select statement timeout

9. memo in select statement

10. Problem with SQL SELECT Statement

11. Problem with SQL SELECT Statement

12. ASP select statement using Fox tables

 

 
Powered by phpBB® Forum Software