Microsoft KB Archive/196023

= PRB: Cannot Get Individual Items from the Projects Collection =

Article ID: 196023

Article Last Modified on 12/10/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q196023



SYMPTOMS
Referencing a project collection's item without the keyword 'Item' may cause the following error:

File ' ' does not exist.



RESOLUTION
To access an individual item, use the following syntax: oProj = APPLICATION.ACTIVEPROJECT oFiles = oProj.FILES oFile = oFiles.Item[1] ?oFile.NAME



STATUS
This behavior is by design.



Steps to Reproduce Behavior
Run the following code from a program file with a project in memory that has at least one file attached to it: oProj = APPLICATION.ACTIVEPROJECT oFiles = oProj.FILES oFile = oFiles[1] ?oFile.NAME RESULTS: The third line returns the following error:

File 'ofiles.prg' does not exist.

Keywords: kbprojmanager kbprb KB196023

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.