Subform to subform

mjdemaris

Working on it...
Local time
Today, 15:04
Joined
Jul 9, 2015
Messages
426
So, how would you go about selecting a record from one recordset and adding it to another?

RS1 is set within SubForm1 within Form1. RS2 is set within SubForm2 within Form 2.

I would like to open Form1, click a button which opens Form2, select a record or two, and add the selected records to the SubForm1.

I've got as far as getting the "?Name" error in SubForm1's fields.

This is how I set the record set from within Form2:
Code:
Set rst = Forms!fRequest1!subOrderDetails.Form.Recordset

Thanks for the help.
 
I would like to open Form1, click a button which opens Form2, select a record or two, and add the selected records to the SubForm1.

If you want to be able to select multiple records I suggest using a listbox with the row source being the same as the record source of Form2.
 
It's not normally good practice to duplicate a record from one table to another. You should mark the record with a status field to identify it is different or expired.
What is the purpose behind the copying?
 
Well, the reason being...is thus:
We are converting from using Excel to Access. The Excel workbook has about 10 spreadsheets worth of past orders - orders we put in for tools, supplies, etc. I can import them into normalized tables after some work with spelling, duplicates, etc. The reason for three tables: Vendors, Materials, VendorMaterialJoin (for multiple vendors with part numbers).

But, the tables in use for the ordering system are more like: Order, OrderDetails - so that each item ordered from now on will be stored in the Details table, which uses an OrderID_FK to reference the appropriate Order. I can't put all the previous history into the Details table because there is no OrderID for those items. So, I've split the three tables into a separate DB and linked to that from the Order DB. Now, if someone wants to reorder something from the old Excel system, they can search for it. Then, I would like to add that to the current Order DB into the Details table.

Eventually, I think, the need for the old information will go away - if it's been years since last ordered, or all of the needed materials are in the new DB.

Hope that makes sense.
 

Users who are viewing this thread

Back
Top Bottom