Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to setup the tables
Message
De
30/08/2002 08:18:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
29/08/2002 16:18:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00694820
Message ID:
00695363
Vues:
17
>Yes that is the type of structure I normally would have used. However, I need some way of picking some record thats in the middle of all processes and then starting the process over again. Recall the need to setup the back and forward buttons. Anyway, I lost as how I can do it. I do thank you for your help.
>
>John

OK, let's assume the following table structure.

Table "Article" has field "Article" as PK.

Table "ArticleMaterials" has fields "Article" and "Material" (i.e., "Article" contains "Material").

There are several ways to get the desired result. I will explain one.

A form, let's call it "ArticleAndMaterials", shows the article (one record from table ArticleMain) in one page of a pageframe, and its materials (several records from table ArticleMaterials) in another page, on a grid. (1)

Now, the user goes to page "Materials", and selects a material that is, really, an intermediate product. With the click of the button, the following command is executed:
do form ArticleAndMaterials with ArticleMaterials.Material
Now, a second instance (2) of form ArticleAndMaterials is loaded. It will show, as "Article", the material that was selected in the other instance of the form - plus all of its materials.

This, of course, can be repeated again and again. When the user closes the form for the last article, he gets back to the previous level (because the form comes to the front).


HTH, Hilmar.



Notes:

(1) Several alternatives exist here, of course: same page, or even materials in a separate form ("parent-child" forms).

(2) At least this form must needs have a private datasession, to avoid conflicts between the different instances.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform