Form/Filter by Form/Subform

D

Dennis Damsgaard

I have a form that gets data from a large Oracle table. I then use the
"Filter by Form" button to refine the data. This works as expected. I can
either view the records in the main form or click the "Datasheet View"
button. I can use "Filter by Selection" to refine the results.

What I'd like to do is have a subform which shows the "Filter by Form"
results in datasheet view. I have tried using the wizard but I end up with
all the records in the subform, not just those that meet the filter
condition. It's clear I don't know how to link the two forms.

Can someone provide me with some hints or point me to some documentation on
how to link the form/subform for the situation I describe? I have some
coding experience if that's necessary.

And for extra credit, is using the table as the record source a good idea?
Or am I dragging millions of records across the network? Use a query
instead?

Sincere thanks in advance for any assistance.

Dennis
 
D

Dennis Damsgaard

I see how to get started.

1. Assign a public variable in the Form module - strFilter.
2. Create a new form called DetailForm. Use the same table as record
source.
3. In the Current event of the main form (after the filter by form button
is clicked), assign the filter to strFilter.
4. Assign the filter property of the DetailForm to strFilter.

But there are two problems.
1. It's a little slow.
2. The Current event occurs twice.

Again, thanks in advance for any help.

Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top