Copying all current records in a subform

branston

Registered User.
Local time
Today, 22:19
Joined
Apr 29, 2009
Messages
372
Hi,

I am trying to find a way to copy all records currently shown in a subform.

The main form has a lot of filter options, and rather than doing an if statement for each filter option, i was hoping to just copy every record that is on the screen.

Any ideas??
Thanks
 
So I can run a loop through every record in the new table.
I have figured out how to copy the 1st record (by making a query and setting the criteria to call the subform) but i need to get them all in.
 
Are your form filters built into the query that the subform is bound to, or do you filter it via vba...or a combination of both?

If you do it the first way, you could probably just use the query the subform is bound to.
 
The way the filters are working is this (I dont know if there is a better way, this is just the way i thought of 1st!)

A simple version is this:
I have a table with a column of names. I then have 5 columns which are set to yes/no.
The main form holds these yes/no boxes. The subforms holds the names. I have linked the form to the subform by each one of these boxes, so when i check one of the yes/no boxes on the form, the names are filtered acordingly.

Do you need to know anything else?
 

Users who are viewing this thread

Back
Top Bottom