Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using multiple tables in page frames
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00088515
Message ID:
00088697
Vues:
37
>>All the samples I've seen involving creating a name and address table assume that a) the info is all in the same table and b) it will all fit on the same page. I have a separate name and an address table. Each record of info contains enough information to require its own page. That's why I decided to create a 3 page page frame. Page 1 contains all the info required for the names, page 2 for the address (and I'm allowing for multiple types of addresses - home, business, etc), and I have a grid on page 3. To complicate matters, I'd like to use the same set of buttons (i.e. have them on the form instead of on each page of the grid). I have the tables linked by a 'peopleid'. But in trying to figure out how to get the adds and saves to work I see various problems:
>>
>>How do I make sure someone adds a name before they try to enter an address (I do have RI code to restrict this in the DBC but not sure how it's going to impact my attempt at adding on the form)? How do I choose the right table to be saved when I'm flipping from page to page (e.g. what if I've already added the names in a previous visit), and am in an edit mode and want to add another address)? That is, how does the save button know "Oh, she's on page two, she wants to save a record in the address table." Or, since the records in these two tables are related, should I play it safe and just save both tables?
>>
>>Sorry for this long problem description, but I'd really appreciate any help or direction on where I go to look for help (samples and Tasmanian traders didn't do the trick in this case!).
>>
>>Sylvia
>
>Sylvia, You can use the ActivePage value or save a form property with the correct DBF name when switching tables. I use the Page Activate() method to set/reset buttons, store the active table, etc. My Save, Add, Edit etc. buttons have a Case statement relating to the table. Also use the Activate() method to disable the address pages until a valid name has been entered and saved.
>
>HTH

Wow! Thanks to you all for the great suggestions. The common theme seems to be use Active Page property, with a dash of disabling the other page frames. This give me something to start working with. I'm sure after doing some work on this (and as Arnold said) "I'll be bach" with more questions.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform