Solved

Change data environment on fly on Form

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
This article outlines the struggles that Macs encounter in Windows-dominated workplace environments – and what Mac users can do to improve their network connectivity and remain productive.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

627 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