Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh?
Message
 
À
25/05/1999 21:32:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00222731
Message ID:
00223263
Vues:
25
Hi Jason,
I never use 'Fields' (6) for RowSourceType in a Combo. Change it to 'Alias' (2).

I don't know exactly how SET KEY works (another command I never use) but it would seem to be a combination of SET RELATION and SET FILTER. As you remember, I asked earlier about SET RELATION. If you have a relation set, then moving the record pointer to the master table automatically sets the record pointer on the child table to the first record found.

Anyway, it looks like you have it working. Feel free to ZIP up the form and a small set of tables if you want me to look at it.

Barbara

>Hi Barbara -- Great to hear from you again
>
>1. To answer your last question, I do not have a pageframe set up. I learned my lesson with that a couple of months back. I thought my world was crashing down around me until Jim Duffy told me if I had two pages or more I need to add code into the active().
>
>2. As far as the record pointer issue is concerned, the cursor is showing up in the second record. I did not issue any thisform.refresh() anywhere. Where would that go? In the init event of the child?
>
>3. * I have made a discovery since last night. I have actually got the thing to work in the last hour, but it isn't the way I want it to work. It is more or less a band-aid so I can soldier on.
>
>Through trial and error, I decided to do a few things. I took the code I had placed in the init() out:
>
>lparameters tnvoterid
>=seek(tnvoterid,"votersfile","nfieldid")
>=seek(tnvoterid,"fielddetail",nfieldid")
>set key to votersfile.nfieldid in fielddetail
>
>.... and ran the form as a stand alone, just to see if the form worked and I could add more than one record without FoxPro placing the value i typed in the two textboxes of the first record into the second, and it still did it! Unbelievable.
>
>So, I decided the only other thing that had a chance of causing this problem was the combo box I had created at the join field (nfieldid), to receive the code_name (cfieldname) from the parent and place it automatically into the field (combo box I set up to to display the field text and store the numeric data).
>
>To give you some background on what i did. I simply dragged my "nfieldid" field up from the data environment (child form) and placed it onto the canvas. Then, I deleted the default txtbox and created combo box:
>
>rowsource: voterfile.cfieldname,nfieldid && parent table
>rowsource type: 6
>bound = 2 && I wanted to bind the nfieldid column
>bound to = .T.
>column count = 2
>
>
>I decided to away with this and just leave the txtbox on the canvas and have the "number" associated with the fieldname (Cong_dist for example) go into the box.
>
>As soon as took away the bound combo box and did this, I was able to add records until my little heart was content.
>
>the drawback of course is now I am viewing a number in a textbox, and not the "text" I want to see. It is just an assignment form for our team to use, so it isn't that big of a deal. It just drives me nuts I can't get something to work properly.
>
>I have other parent forms that fire a child form and place a specified field value into a combo box of the child and display the text and store the number.
>
>The only difference is, for those forms, I didn't have two textboxes to enter other values.... I only had 2 combo boxes. Still, this should work w/o having to make a sacrifice such as not being able to view the text.
>
>If you have any further insight, don't hesitate to fire back at me. You have been very helpful
>
>jason
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform