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

Fox Pro Screen Help needed...

Status
Not open for further replies.
Mar 19, 2002
18
US
I am running Fox Pro 2.6 and have a simple database set up and have built a "screen" for this database.

Now,I want to use that SAME screen (or at least the formatting) to run a query in. I have built the query already. I opened the "screen" in "modify" and did a "Save As" and saved the screen with a new name.

My question is, how do I change the "data source" to that screen so that it will so only the records of the query I built?

Any help will be appreciated.

Thanks,
David
 
You will have to give your query the alias you used for the screen, or modify the items to use the alias of your query, or remove the alias name altogether from the the variable itself.

Dave S.
 
Or if you save the environment for that screen, well you have to remove it then follow what Dave said.


foxwizard
email: brensoriano@yahoo.com
 
Personal preference, I *hate* having 2 screens that are exactly the same. idiom...code written twice is code written once too often.

Since your query is gonna be a subset of the inital dbf, consider using SCATTER MEMVAR and GATHER MEMVAR and use the memory alias on the GET instead of the direct field alias.

This way takes a little longer to plan and layout, but believe me it will save you much frustration in the long run.

If you absolutely *must* have 2 screens, open the second screen, and clear the ENVIRONMENT setting, minimize the Screen builder window, run you query from the Command Window, type SET in the Command Window, and close all the dbfs that you don't want.Maximize the Screen Builder window and click on the Save Environment button.

When you Generate the screen, be sure to Uncheck the Open DBFS button (coz you queried Cursor probably doesn't exist yet), Make sure to put your query in the Screen Set-Up section.

HTH - Wayne

 
David, one thing I forgot...you have have to open the second "copied" screen and edit the GETS, changing from
"my_original_dbf.fieldname" TO "my_query.fieldname"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top