Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Child Link Field Will Not Up-Date

Status
Not open for further replies.

rburkh

Technical User
Oct 19, 2001
13
US
Subject: Child Link Field Won’t Update

I am a novice programmer working on a project for my repair shop. I am developing a program to track repairs at an electronics repair shop. So Far I have my tables set up and seem to be normalized correctly.
At the "table level" all is well. I Have 4 tables, tblCustomerData,tblServiceUnit,tblJobStatus,tblJobEstimate.
At the "table level" I can enter a new customer, enter new service Items to be repaired, add a current Job Status for each individual repair, and I can enter an estimate for each repair. At the table level the Foreign Key in each "many side" table gets automatically filled in with the Primary Key from the one side table. All data entered in the tables remains intact as expected.
The problem I am having is at the form level. I have a main form for gathering Customer Data. This Form has a SubForm(Datasheet) to enter new service units to customer record. Each service unit record in this datasheet will expand and present a small "form view" form to enter or view the current job status of the selected job. Up to this Point all works great. Here is the problem; this Form View form has a button created courtesy of the Control Wizard that opens another "Form View" form for entering repair estimate data. This form has been linked to the parent form through a text box field called "JobStatusID". The Value in the parent form link field will not cascade up-date the child forms "JobStatusID" text box field. If I manually enter the value, all is well. If I don't manually up-date the text box with the keyboard, the Child form link field "JobStatusID" displays a zero, and if I enter data I create an orphan record. The forms data source is based on a query that seems to work ok, I can manually enter the "JobStatusID" from the the parent form into the child form "JobStatusID" and all data is stored and retrieved correctly.
I have spent many days trying to solve this on my own, but I just don't understand why it works at the table level but not at the form level. Any suggestions would be greatly appreciated.
 
Okay make sure your customer table has many relationships to all the other tables and they are all cascade updatable.

One thing I use to run into is where to join the relationships at. So that is something that I always check first off. I have found that as long as I have the one side prim. key joined to the many side with the foreign key then all is well. Check that and also make sure the way your forms are setup reflect your relationships that you created. Another thing is to check your queries that you have run and make sure they are not snapshots or anything like that. And finally do a thorough check of your linking with the forms, sometimes it is very easy to put in wrong master and child link properties.... Wait there it is!!!!
Using the control wizard to create a button that opens another form. What is happening is since you have the button on the subform it is not linking right since you are not going from the source being the main form. Its trying to pull a value that is not there. Try moving the button to the main form and things should turn out right.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv [pc1][shocked]
 
Hmmmm....Thanks for the reply. I will move the button and see how it comes out. I will let you know. Thank You!
 
docmeizie,
I tried the button on the main form and it wouldn't work. I don't have a direct relationship from the main form to my frmJobEstimate form view form. However, I did discover that if I Go through the motions to add a job estimate and open the form, then put the form in design mode, then go to the form properties,Data,Filter property what I see there is [JobStatusID]=4. Which in this example is exactly what the JobStatusID is supposed to be for the record I am in. I tried it for different records and it is always correct. I don't know how this filter property works, but it seems to have the correct data always. I am confused about that.
I will continue to try to solve this problem, any additional suggestions are appreciated. Thanks in Advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top