In access 2007, I have a mainform and subform. subform is in datasheet view. these fields are saving into the table. but in mainform also i have 2 fields to be saved into same table. how to save mainform fields.
Please help me as early as possible
In access 2007, I have a mainform and subform. subform is in datasheet view. these fields are saving into the table. but in mainform also i have 2 fields to be saved into same table. how to save mainform fields.
Please help me as early as possible
Why would you want to save the data to the sub forms table if the data is already in the table of the main form.
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
Perhaps you could achieve this with code in the subforms Before Update event. Something like:
Me.[SubControlName1] = Parent.[MainControlName1]
Me.[SubControlName2] = Parent.[MainControlName2]
Substitute SubControlName1 and SubControlName2 with the names of the controls on the sub form.
Substitute MainControlName1 and MainControlName2 with the names of the controls on the main form.
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
Mainform controls Directly stored into table fields when i click on save button subform fields are saving in the table as well as mainform control(2 controls) also saved into the table fields.. i don't have any controls in subform related to maincontrols. so i want to store the values automatically with subform fields.Perhaps you could achieve this with code in the subforms Before Update event. Something like:
Me.[SubControlName1] = Parent.[MainControlName1]
Me.[SubControlName2] = Parent.[MainControlName2]
Substitute SubControlName1 and SubControlName2 with the names of the controls on the sub form.
Substitute MainControlName1 and MainControlName2 with the names of the controls on the main form.
The Main Form shows One Record from a Table.
The Sub Form can show many records from a different Table.
If you were displaying One Record in the Main Form. (There is no other choice)
Then you displayed 29 Records in the Sub where you you want to store these Two Fields.
subform is datasheet view when i enter the data in these fields stored into table(this form fields are saved inthis table). in the mainform purchase_id and notes two textboxes are there. in the purchase_id textbox the value come from listbox from other tables. and in the notes textbox when i enter the data this data and purchase_id value will be stored into table. these two textboxes are in mainform. i assigned to these controlsource property but these are not saved into table how to save.
I can't understand what you are trying to do.
Please post a copy of your Database. Cut it down and only show what we need to see.
Please post in A 2003.