Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using the same form for different tables
Message
From
07/07/1999 14:09:05
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
07/07/1999 14:06:33
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00238420
Message ID:
00238422
Views:
10
Steven,

There are a couple of ways to do this. I'm partial to opening the tables in the LOAD method, and always using the same alias. This way the controls will bind just fine.

For questions like this, remember LISA G, the order of events when running a form:
1. Load
2. Init
3. Show
4. Activate
5. Got Focus

Hope this helps

>I have a payroll system written in FoxBase (about 10 years ago). I migrated it to FP DOS when I inherited it 5 years ago. We are now rebuilding it in VFP (v6 sp3). There are 4 companies, each with its own personnel file, payroll files, etc. However, the rules are basically the same for all companies.
>
>I would like to use the same forms to edit each company's records. That is have one personnel form, one payroll corrections screen, etc.
>
>In FPDOS or FPWin, we would simply pass a parameter to the screen, and in the setup code select the appropriate table, give it an alias, and process away.
>
>In VFP, from what I have seen, the form's controls are instantiated before the INIT for the form, so a parameter can't be used to select the appropriate table...the table needs to be open at the time the controls are instantiated since they are bound.
>
>I guess I'm just searching for a clue or an idea. This seems to be a problem that is much more complicated in VFP than it was in FPWin.
>
>Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform