On 8 mrt, 17:09, salad <o...@vinegar.comwrote:
Henrootje wrote:
Hello there!
I have a piece of code in a module (function) that constructs a
filter.
But now I run into a problem.....
It seems that I can only set a filter form a module if I open the form
in design mode..............
(that is, if changing the filter from a module / called function)
But that means any other changes I made on the form (such as f..e. the
rowsource of several comboboxes) will be
undone........................
Is my conclusion right?
The referring from elsewhere just did not want to work. But I put the
code in a sub on the foprm itseld and now call that sub whenever
needed. Works like a charm!
>
Me.Filter = "ID = 1"
Me.FilterOn = True
If referring from elsewhere
Forms!Form1.Form.Filter = "ID = 1"
Forms!Form1.Form.FilterOn = True
Or
strFilter = "Select * From Table1 Where ID = 1"
Me.Recorsource = strSQL- Tekst uit oorspronkelijk bericht niet weergeven -
- Tekst uit oorspronkelijk bericht weergeven -