[urgent] Filter form depending on subform contents (A2K)

H

hufflehuffle

Hi!

Again, I want to filter a form's content depending on a subform field.

Thanks to Allen I know it is possible through code by setting the
master form's record source to an inner join with the corresponding
where clause.

The problem is: I'd like to use Access' Filter function to let the user
specify his own criteria for the filter. But the resulting "Filter"
setting refers to control names ("((Control1.text = "findme"))") so I
cannot simply use this value for my inner join.

Is there a solution for this as well?

Sorry for the [urgent], I'm a little behind schedule :)

Best regards,
Andreas
 
M

Martin Schneider

The problem is: I'd like to use Access' Filter function to let the user
specify his own criteria for the filter. But the resulting "Filter"
setting refers to control names ("((Control1.text = "findme"))") so I
cannot simply use this value for my inner join.

Is there a solution for this as well?

Sorry for the [urgent], I'm a little behind schedule :)

Found a solution as follows.

I put the INNER JOIN clause into a separate query and set it as a
recordsource for the main form.

When the filter is set for the subform, it expands the INNER JOIN clause
by a WHERE clause representing the filter, modifies the QueryDef
accordingly and requeries the forms recordsource.

Voila.

Best regards,
Martin
 

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