Filter a form from a table

P

Pedro

Hello everyone
I've set a filter to show me records in case a field is true but also asks
the user for a value. When i open that form i have to press the button "aply
filter" or else it doesn't filter my records or ask me that value.
It's a form that shows value from a table and the user simply add values to
it, on that same table.
Question : Can i "say" somewhere, when i open this form to aply filter?
The filter is : [Comissionavel] = TRUE AND [MTEC] LIKE [Introduza valor MTEC]

Tks in advance
Pedro
 
S

SusanV

In either the form's OnLoad or OnOpen event, put the following code:

Me.FilterOn = True

If you think user's might turn the filter off, but want it on whenever the
next record is displayed, put it in the OnCurrent event instead.
 
P

Pedro

Susan, you're the best
tks lot

SusanV said:
In either the form's OnLoad or OnOpen event, put the following code:

Me.FilterOn = True

If you think user's might turn the filter off, but want it on whenever the
next record is displayed, put it in the OnCurrent event instead.

--
hth,
SusanV

Pedro said:
Hello everyone
I've set a filter to show me records in case a field is true but also asks
the user for a value. When i open that form i have to press the button
"aply
filter" or else it doesn't filter my records or ask me that value.
It's a form that shows value from a table and the user simply add values
to
it, on that same table.
Question : Can i "say" somewhere, when i open this form to aply filter?
The filter is : [Comissionavel] = TRUE AND [MTEC] LIKE [Introduza valor
MTEC]

Tks in advance
Pedro
 
S

SusanV

Hardly the best lol - I get much more than I give here - but I'm certainly
glad I was able to help!

Pedro said:
Susan, you're the best
tks lot

SusanV said:
In either the form's OnLoad or OnOpen event, put the following code:

Me.FilterOn = True

If you think user's might turn the filter off, but want it on whenever
the
next record is displayed, put it in the OnCurrent event instead.

--
hth,
SusanV

Pedro said:
Hello everyone
I've set a filter to show me records in case a field is true but also
asks
the user for a value. When i open that form i have to press the button
"aply
filter" or else it doesn't filter my records or ask me that value.
It's a form that shows value from a table and the user simply add
values
to
it, on that same table.
Question : Can i "say" somewhere, when i open this form to aply filter?
The filter is : [Comissionavel] = TRUE AND [MTEC] LIKE [Introduza valor
MTEC]

Tks in advance
Pedro
 
Top