Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change data environment on fly on Form

Posted on 2010-09-24
2
Medium Priority
?
388 Views
Last Modified: 2012-05-10
Hi Experts,

This is the first form (.scx)I have created myself to manipulate data, so sorry for my ignorance.  I used the wizard to create the form.  And it asked for the underlying data so every time I load the form now the data environment shows the table.  I want to change the data environment depending on the information in another variable.  I know I can delete the file from the data environment and then change the field names to not reference the file. The question is how to load the proper data environment into the form. I have a company variable that changes when the user goes to that company information.  So I want to load the relevant data environment (lets call them company1 and company2) for the specific company variable.  I should add that I am using VFP 6.0.  Thanks for your help.
0
Comment
Question by:mbibmdi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:mbibmdi
ID: 33756620
adding use tablename to the form's Load event seemed to do the trick.  Let me know if this is the wrong way to go
0
 
LVL 30

Accepted Solution

by:
Olaf Doschke earned 1000 total points
ID: 33757994
this is okay. If you want to stay with the data environment, it also has a code section behind the visual canvas of table and view objects, there is a OpenTables method made for opening tables.

Bye, Olaf.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question