Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disappearing Grid
Message
De
04/04/1997 14:01:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00026954
Message ID:
00027044
Vues:
44
>>I have a form based on three tables: Customer (obvious), Service (active service records for selected customer), and Parts (parts for selected service record). When the customer picks up the equip., the service record and its parts records are moved to Inactive and InacPart, respectively.
>>
>>The user wants to be able to switch between viewing active and inactive service records. To accomplish the switch (without having two copies of the same form), I do the following:
>>
>>SELECT Service
>>USE Inactive ALIAS Service
>>SELECT Parts
>>USE InacPart ALIAS Parts
>>
>>After re-establishing the relationships, everything works great except for the grid showing the parts: it disappears completely. No columns, no rows, just a white rectangle where the grid used to appear. Can this be fixed, or am I forced to live with the overhead of two forms?
>>
>Not exactly sure what you're doing, but...
>Sounds like the grid lost its source...you may need to set the recordsource = '' and the reset it to parts after your changes.

Thanks for kicking in here.

Let me explain a little more clearly what I am trying to do: I want one form to function as both the ACTIVE and INACTIVE service record form. The user presses a button while in ACTIVE; in the Click() method, I change tables to the INACTIVE set, using ALIASes so that the RecordSource for the controls on the form remains intact. Using the SERVICE table as an example, I close the SERVICE table, open the INACTIVE table, and give it an ALIAS of SERVICE. All of the controls on the 3-tab form are oblivious to this change--the ALIAS is identical-- and begin showing the INACTIVE record fields. The only exception is the grid control: it disappears. It is true that, for a fleeting moment, its RecordSource is closed, but I re-open the table with the same ALIAS.

Any ideas???

TIA.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform