General information
Title:
Adding more than one record to child form
Hi -
I am having a "fair" amount of problems with two new tables and forms I created. I have received help on this issue from several developers over the past 24 hours, but I still have not got it to work. I am going to try to post a more detailed post and do a better job of explaining my situation, and maybe someone will be able to shed some light on my particular problem.
Situation:
I have a parent form (votersfile) and a child form (fielddetail). My votersfile table is keeping track of various fields used to tell us which voters to pull for a specific office:
Example:
Record 1
Label = Congress
Code = Cong_dist
Record 2
Label = State Senate
Code = St_up_hous
When I fire my child form, the "code" automatically appears in my child form. Example: If I was on record one and clicked my cmd button "assign", Cong_dist would pop up in my nfieldid combo box on my child form, just the way I want.
So far, so good!
the child form is assigning "options" to the "code":
Example:
Record 1 :
Fieldid = Cong_dist
option = 001
label = Broward
Record 2
Fieldid = Cong_dist
option = 002
label = Miami-Dade
*** I can assign the first one, however, when I click "add" and go to assign another option I have problems.
As soon as my cursor touches my option textbox, FoxPro places the previous value I typed. In this example, if I was to go and type 002 in the second record, FoxPro will place 001 in the second record as soon as the cursor touches it!
Now, I can delete the text and type in 002 in the option field, but it only will change the 001 to 002 in the first record, leaving record number two blank in the option field.
If I go back to my table and look at what is stored, I can see the first record, and the second record just shows the autokey number and ID # for Cong_dist, but the option and label field is blank.
Very wierd! There are two autokey numbers being generated, but only the first record is allowing any values in the option and label textbox.
_____________________________________________________________________
Background information:
I have code placed in the init() of my child form:
lparameters tnvoterId
=seek(tnvoterId,"votersfilefields","nfieldid")
=seek(tnvoterId,"fielddetails","nfieldid")
set key to votersfilefields.nfieldid in fielddetails
The code in the click() of my cmd button on my parent form is:
do form fielddetails with voterfilefields.nfieldid
That's about it...
TIA for any comments to this problem
Jason
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only