Add new records from a filtered query

Dumferling

Member
Local time
Today, 19:14
Joined
Apr 28, 2020
Messages
102
I am not sure how I go about this. I have contracts which are listed in one table (Contracts). A contract can be affected by different regulations, depending on the industry (lets say Insurance) So, I have a related table (Regulations) on which I want to list the different regulations for each Insurance contract. Every time a new contract is added, I need to go to a third table (RegulationSource), filter the list by Insurance and add each regulation to the Regulations table.

How do I get Access to look at a filtered set of records, pick up each one and add them to the table? The adding I can do (AddNew) but how do I get to look at a filtered set of records and scroll through each one until the end of the recordset? It's not something I have ever done before.
 
If it is in form use the recordsetclone property.
If in a listbox, walk through it's recordsource.
Then probably use an insert query to add the records?

arnelgp has just posted an example using recordsetclone.

Try searching for that.

Here it is, as I do not think the search looks in code tags :(
 

Users who are viewing this thread

Back
Top Bottom