I have a subform displayed records filtered from a main table. Could you please show me know to save all those filtered records in my subform to another table ? I've searched the forum but could not find the answer. Your help is much appreciated.
Set db=CurrentDB
strSQL="Select * INTO NEWTABLE from dbo_hc_v_lt_plaintiff_labels where cause_id in (" & txthidden.Value & ")"[/tt]
db.Execute strSQL, dbFailOnError
It is generally better to list fields rather than use *. For the most part, it should not be necessary to copy sections of a table to another table. If a temporary table is necessary, you will usually find that just the ID field is sufficient.
You can use an append query to add records to an existing table.
[tt]strSQL="INSERT INTO NEWTABLE Select * FROM dbo_hc_v_lt_plaintiff_labels where cause_id in (" & txthidden.Value & ")"[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.