I forgot to respond to a couple of your questions. The queries are made up from individual tables e.g. reports, photographs, notes. These are then linked together as one to many and connected back to the main table which is the "main form"
Synchronise sub forms via buttons from main form
Collapse
X
-
By what field are they connected to the Main Form?
Originally posted by PhilBowenI forgot to respond to a couple of your questions. The queries are made up from individual tables e.g. reports, photographs, notes. These are then linked together as one to many and connected back to the main table which is the "main form"Comment
-
Phil,
I don't understand what you mean. But if at one table in each of your subform source queries doesn't have a field with a direct link (reference not same) to the Primary Key on your main form you cannot use them as a subform.
Originally posted by PhilBowenAutonumber in the original and then number following advice.Comment
-
As advised by comtech (above) I have set the Primary Key for the main form as Autonumber (i.e CustID = Autonumber). I have then removed the autonumber form the sub forms and the replaced it with "applicatio ns" both on the main form and on ths sub form.
I have then used the autonumber on the main form as the primary key and the "applicatio n" on the sub form for the primary key
Regards
PhilComment
-
Using the autonumber on the main form as primary key and then application on the sub form as the primary key; one to many. I click on the button input the photograph. I then go to the next main form and enter the sub form. The photo is as laoded on the sub form via the first main form. (The sub form is not sycnchronised with the main form.)
Regards
PhilComment
-
Did you use the wizard to attach the subform to the main form.
That is, did you predesign the subform and then drag the subform tool on to the Main Form and use the Wizard in Access to attach it. Even if you did this previously I would suggest redoing it. If the Parent Child relationship is not clear then the Wizard won't be able to attach the subform.
Originally posted by PhilBowenUsing the autonumber on the main form as primary key and then application on the sub form as the primary key; one to many. I click on the button input the photograph. I then go to the next main form and enter the sub form. The photo is as laoded on the sub form via the first main form. (The sub form is not sycnchronised with the main form.)
Regards
PhilComment
-
Thanks. Yep! Tried that. I have gone back to basics since I was in touch last and re done the forms, connected via on to many, Auto number on the main form and connected to sub form by name "applicatio n" which is common to both main and sub form. Same problem.
If I input data into the sub form without connecting to the main form then it inputs data and photos sequencially. No probs. It is onlt when I try to link/ synchronise the sub form to the main form that this problem reoccurs. I have visited Northwind data base. No luck. I have visited the Microsoft and other web sites re this synchronisation/ linking. I have followed instructions exactly/ to the letter. I am sure that this is fundemental problem and that I am missing something simple here.
It is not for the want of effort or trying.
Regards
PhilComment
-
Phil
I get the impression from your last email that your relationship is backwards
In this instance of a one to many relationship the records on the side of one have to be the recordsource of the main form and the records on the many side have to be the recordsource of your subform.
In this case the unique ID of your subform Application would not be the represented in the recordsource of your main form. The case should be that the unique ID on your main form the Autonumber ID would be represented in the record source of your subform as Number ID (not an autonumber type) this is the foreign key reference in your subform to the unique Primary Key ID of your main form. You cannot do it the other way around.
Originally posted by PhilBowenThanks. Yep! Tried that. I have gone back to basics since I was in touch last and re done the forms, connected via on to many, Auto number on the main form and connected to sub form by name "applicatio n" which is common to both main and sub form. Same problem.
If I input data into the sub form without connecting to the main form then it inputs data and photos sequencially. No probs. It is onlt when I try to link/ synchronise the sub form to the main form that this problem reoccurs. I have visited Northwind data base. No luck. I have visited the Microsoft and other web sites re this synchronisation/ linking. I have followed instructions exactly/ to the letter. I am sure that this is fundemental problem and that I am missing something simple here.
It is not for the want of effort or trying.
Regards
PhilComment
Comment