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

Passing multiple fields to another form

P: 3
I have a form with a subform. The subform gets populated with multiple records at any given time. I need to get the data from a particular field in the subform (which could be one record or more) to copy over to another form. Can somebody point me in the right direction as to how to accomplish this. Thanks in advance for your help
Nov 26 '07 #1
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
I have a form with a subform. The subform gets populated with multiple records at any given time. I need to get the data from a particular field in the subform (which could be one record or more) to copy over to another form. Can somebody point me in the right direction as to how to accomplish this. Thanks in advance for your help
You will need to give a lot more information about what you are doing and why.
Nov 27 '07 #2

P: 3
We are using this as a receiving log to log materials in. The main form would show all the trucking info trailer # BOL etc. The subform will show all the products received in that load. We also print out pallet tags for each product received, this is what the new form does. So when we receive a load the operators supply all the info for the trailer and log all products, could be one pallet or several. I need to pull one field out of each of those records and match it with a field in another table to supply the new form with more info in a new recordset. The new form is actually what we are trying to print. Currently I have a qry that runs upon opening the new form that looks at the subform. I thought it would pull out from each record, but it only pulls from the first one. I hope this helps, and thanks for responding.

I have a feeling that instead of using the qry, I am going to have to write a looping sequence to do this.
Nov 27 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
This will give you a recordset of all the records in the subform.

Expand|Select|Wrap|Line Numbers
  1. Dim rst As DAO.Recordset
  2.  
  3.     Set rst = Me.subformObjectName.Form.RecordsetClone
  4.  
Nov 27 '07 #4

Post your reply

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