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

Save data from subforms to a table

P: 41
Hello,

I have three subforms (letís call them SFA, SFB, SFC) on one form (the reason there are subforms is that they are related to different queries).

Each of these subforms contains a data (letís call them SFA1, SFB2, SFB3).

By clicking a button, I want to save SFA1, SFB2 and SFB3 in one table (this table is no related to the queries bound to SFA, SFB and SFC).

Any idea how to do this?

Thank you very much for your help and your answers. If you need any additional information please, let me know.

G.
May 20 '07 #1
Share this Question
Share on Google+
2 Replies


JConsulting
Expert 100+
P: 603
Hello,

I have three subforms (letís call them SFA, SFB, SFC) on one form (the reason there are subforms is that they are related to different queries).

Each of these subforms contains a data (letís call them SFA1, SFB2, SFB3).

By clicking a button, I want to save SFA1, SFB2 and SFB3 in one table (this table is no related to the queries bound to SFA, SFB and SFC).

Any idea how to do this?

Thank you very much for your help and your answers. If you need any additional information please, let me know.

G.
Expand|Select|Wrap|Line Numbers
  1. currentdb.execute "Insert into YourTable ( NewSFA1, NewSFB1, NewSFC1 ) values (" & me.SFA.form.SFA1 & ", " & me.SFB.form.SFB1 & ", " & me.SFC.form.SFC1 & ")" 
  2.  
if your values on your forms are text, then you'll need to surround the values with tick marks ' '
J
May 20 '07 #2

P: 41
Thank you so much, it works amazingly!
May 21 '07 #3

Post your reply

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