Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
All fields except one match key selected with combolist
Message
De
10/08/1999 16:42:26
 
 
À
10/08/1999 15:27:10
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00251721
Message ID:
00252218
Vues:
15
I'll try this and get back to you. Thanks for the help. (aside: u know why my use of the pre seems to turn off wrapping?)

>I'd suggest this.
>Copy the form.
>Remove the CBO.
>Put in a button with this in the click()
>
SELECT [parent]
>SKIP 1
>IF EOF()
>  GO TOP
>ENDIF
>thisform.refresh()
>
>Just see if the fields all display the *correct* record's information.
>
>Next, please post (if you care to, of course) what your two tables are, their aliases, their order properties and whether the relation is one to many. You can get this information by selecting View/Data Environment menu option. The cursors will be there and you can view a properties sheet for them and the DE just like for a form
Primary table: wojrn
Orderered on wojrn.wono
Primary combo rowsource is wojrn.wono
Primary combo controlsource is None
Primary combo Boundto is .F.

Secondary table (R/O) : opindex - two fields, opcode and desc
Ordered on opindex.opcode
Secondary cbo has controlsource = wojrn.opcode
                  rowsource = opindex.opcode,desc
Interactive and Programmatic change transfers opcode.desc to wojrn.opdesc and refreshes. (because wojrn.opdesc is initally related to opcode but may be modified by hand later)
Relation from wojrn into opindex on opcode (both tables have an opcode field). Not sure if this relation is one-to-many in strict VFP parlance. I created the relation by visually dragging the opcode field of the wojrn cursor onto the opcode key in the opdesc table. The opcodes are unique in opdesc, but not in wojrn...which is what you'd expect. From a lay point of view, since I dragged from the wojrn table to the opindex table, I'd call this many-to-one...but what do I know?

I have to admit, the concept of which table is the parent and which is the child escapes me. The documentation I've been able to find on this seems ambiguous. Just from a very 'lay' point of view, I would expect the 'parent' to be the lookup table, since it has all of the information related to the code field by which the two are related ... the parent has all the genes...the child expresses some of them. But the descriptions of the programmatic mapping of relations where one relates table1 into table2 on keyfield seem to indicate that table1 is the parent. Also, when you look at the Datasession window, if I had to guess which is the parent and which is the child, from the graphic, I'd say wojrn is the parent because it appears like this:
wojrn
  |____opindex
If you know of anyplace in the VFP documentation that makes the parent/child nomenclature crystal clear and unambiguous, please direct me there.

(btw. I know enough about SQL to realize this whole parent/child thing is avoided by joining...this is not to say that joins are a piece of cake !!! Out of the fryingpan...IMO)

>>Did you create the form with the form wizard? Are you using the wizard-style navigation toolbars?
>>
>>No. I created the form from scratch (selected NEW form from the PM). I believe I used the builder to set up my cbo initially.
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform