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

Noconsole question

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I have a grid in a form which is populated from the following query statement in the RecordSource
Code:
select customer.c_sname, frames.invno, frames.pictot, frames.intot, frames.freetot, frames.picnam, piccy.p_ref, piccy.owner from frames where frames.pictot>0 order by invno noconsole
How do I prevent the results of the query from being displayed in the main window as well as the grid?
I thought that was the job of noconsole.

Where can I find an explanation of the layout option - 'view' (Browse Browse, Browse Change etc.)

Keith
 
Keith,

You shouldn't need NOCONSOLE in a SELECT. By default, the results will be displayed in a Browse window. The Browse will normally appear in its own window, which you can resize if you wish.

If a form is active when you issue the SELECT, the Browse window will be contained within the form. If the form is particularly small, the Browse will be small as well.

If you don't want to see the results at all, use INTO CURSOR or INTO ARRAY with the SELECT. This will create a cursor or an array, which can then be viewed or accessed programmatically, as you wish.

If this doesn't answer your question, perhaps you could clarify exactly what you wish to achieve.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
This is a quick test form containing a grid.
The grid is populated from a sql query statement.
When I run the form, the grid is populated within the form but a browse window also opens up in the main foxpro window.
I have SET TALK set to off.
Is there another environment var which needs to be set?

Keith
 
Keith,

Add the INTO CURSOR clause to the SELECT (example: SELECT * FROM ... INTO CURSOR MyCursor). Then set the grid's RecordSource property to the name of the cursor ("MyGrid" in this example). That way, the grid will be populated but you won't see the Browse window.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top