Solved

Change data environment on fly on Form

Posted on 2010-09-24
2
331 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
2 Comments
 

Author Comment

by:mbibmdi
Comment Utility
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 29

Accepted Solution

by:
Olaf Doschke earned 250 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now