By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,762 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,762 IT Pros & Developers. It's quick & easy.

Copy Data From Subform to Table

P: 1
Hello,

I have a form that contains a subform, what this form is for is to add planned hours to jobs. What I want to do is add the hours to a job hit save and have the field(s) I just edited be copied to a table.

The subform is bound to a query that links 2 tables. (The subform is a datasheet). I have a combobox that allows me to filter the subform by person. So by doing this each person can go into the subform, change it to only show their jobs and add their predicted hours and comments beside some jobs. Once they have done this they will hit Save and close which will do just that but will also copy over the records that had data entered into them to an existing table .
For the "Copy only if it has been edited" Part. Could I just add an IF statement, saying IF Hours is empty then don't copy the record?

I know what I want to do but I don't know a lot about access vba to be able to implement this.

Thanks for your time.
Jun 16 '17 #1

✓ answered by NeoPa

Try to think of it a bit differently. Forms are not places where data is stored. They are merely a window on some data source. That can be a query or a table, but whichever it is would be where the data you see on the form is actually stored.

Thus, we don't have a problem of saving the data once entered, as it's already there. Always assuming the forms are designed correctly in the first place of course.

Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,489
Try to think of it a bit differently. Forms are not places where data is stored. They are merely a window on some data source. That can be a query or a table, but whichever it is would be where the data you see on the form is actually stored.

Thus, we don't have a problem of saving the data once entered, as it's already there. Always assuming the forms are designed correctly in the first place of course.
Jun 17 '17 #2

Post your reply

Sign in to post your reply or Sign up for a free account.