Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Data
Message
 
À
20/05/1997 09:23:57
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00032905
Message ID:
00033081
Vues:
46
>>>>OK, lets see if I can explain what I need here :-).
>>>>
>>>>1. I have a page frame set up where the first page is to enter in customer data the second page is a grid where they can see the items already entered in for that customer on page one.
>>>>
>>>>2. The client needs to add a new item for the current customer on page 2. This is no problem I have it doing this. The problem is that the customer id from page 1 is not being saved in the items table from page 2.
>>>>
>>>>3.So when you save the record it is no longer there because the customer id did not get saved with the rest of the data in the items table.
>>>>
>>>>How do I get the customer id from page 1 to be saved with the items data on page 2?
>>>>
>>>>Thanks for any assistance.
>>>
>>>
>>>How are you adding the new item record? APPEND BLANK? Use INSERT-SQL to place the customer number in the new record before adding the item.
>>
>>
>>I'm using the add button from the wizard. Which I assumes appends a blank.
>
>
>IMHO, once you've gained a comfortable familiarity with VFP, stop using the wizards, their generic nature usually means a lot of unnecessary coding..
>
>In the meantime..
>
>place code like this in the add button
>
>...
>wizbuttonclass::cmdAdd
>
>IF THIS.Parent.EditMode .AND. EMPTY(cust_id) && assumes item table is current
> REPLACE cust_id WITH id_from_page_1
>ENDIF
>...
>
>HTH

I've fiddled with wizard code a lot. My excuse is that I inherited programs written by others using the wizards, and the easiest way to get something working right away was not to start over. The form wizard does indeed use APPEND BLANK, and other things that I've learned here are questionable. My framework, such as it is, starts with wizard code and slowly evolves into something else. For example, the APPEND BLANK got replaced with a INSERT.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform