Export (0) Print
Expand All
Expand Minimize
3 out of 3 rated this helpful - Rate this topic

SELECT Command

Activates the specified work area.

SELECT nWorkArea | cTableAlias



Specifies a work area to activate. If nWorkArea is 0, the lowest-numbered unused work area is activated.


Specifies a work area containing an open table to activate. cTableAlias is the alias of the open table. You can also include a letter from A through J for cTableAlias to activate one of the first ten work areas.

By default, work area number 1 is active when you start Visual FoxPro.


Fields in tables open in any work area can be included in Visual FoxPro commands and functions. Use the following formats to access fields in a table open in a work area other than the current one: alias.field or alias -> field.

The following example demonstrates ways of selecting work areas.

OPEN DATABASE (HOME(2) + 'Data\testdata')
SELECT 1     && Work area 1
USE customer  && Opens Customer table

SELECT 2     && Work area 2
USE orders  && Opens Orders table

SELECT customer     && Work area 1

SELECT B     && Work area 2
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.