Solved

Change data environment on fly on Form

Posted on 2010-09-24
2
375 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 29

Accepted Solution

by:
Olaf Doschke earned 250 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

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…
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

752 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