Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using multiple tables in page frames
Message
From
31/03/1998 16:30:15
 
 
To
31/03/1998 16:20:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00088515
Message ID:
00088520
Views:
34
>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

Save button or any other common button can get knowledge about current user's activity by checking Pageframe.Acivepage property. Save.Click routine should contain code to provide RI-proper table filling, i.e. parent first and child second. Also, you can enable/disable Save button depending on user's activity, e.g. prevent Save until some changes made.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform