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

  • Thread starter Thread starter hufflehuffle
  • Start date Start date
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
 
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
 
Back
Top