Braulio cordova
asked on
Create a table or append a table from a subform results
I have a main form with a subform. On the main form i have combo boxes in which the end user selects their search criteria. I want to be able to have a button that appends a table with the subform results. Attached is a sample file . Click on sales and their you will see the combo boxes.
help is greatly appreciated
CW.accdb
help is greatly appreciated
CW.accdb
ASKER
Thank you for the reply. I am not that good at coding so I was hoping you can pate the code and I can manipulate to fit my application. Help is greatly appreciated
We don't even know which table to copy to.
/gustav
/gustav
ASKER
Thanks for the quick reply. attached is an updated DB. I have created a local table called appendtable.
Thanks again for the support
CW.accdb
Thanks again for the support
CW.accdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Gustav,
Thank you so much! This is exactly what I need. I am glad I joined Expert Exchange .You guys rock
Thanks again!
Braulio
Thank you so much! This is exactly what I need. I am glad I joined Expert Exchange .You guys rock
Thanks again!
Braulio
You are welcome!
/gustav
/gustav
Open the table you wish to copy to as a DAO.Recordset, say, rsCopy.
Now loop rsSelected, and for each record call rsCopy.AddNew
Assign values to the fields of rsCopy as needed.
Call rsCopy.Update
That's it.
/gustav