filter a form on open ?

B

Brook

good day,

i'm trying to open a form and filter the records based on a check box upon
opening the form...

I know this should be easy, but my mind has run blank..

Can anyone help me?

Thanks,
 
D

Damian S

Hi Brook,

If it's based on a check box, you might want to consider using an On Current
event (if the check box will change each time the record changes)... Either
way, the code is the same...

Either in the On Current or On Open event (depending on which one is
appropriate for you) put:

me.filter = FILTER
me.filteron = true

where FILTER is the filter you require, eg: "[Surname] like '*smith*'"

Damian.
 
B

Brook

Hello...

thank you...

That is what I was looking for!

Brook

Damian S said:
Hi Brook,

If it's based on a check box, you might want to consider using an On Current
event (if the check box will change each time the record changes)... Either
way, the code is the same...

Either in the On Current or On Open event (depending on which one is
appropriate for you) put:

me.filter = FILTER
me.filteron = true

where FILTER is the filter you require, eg: "[Surname] like '*smith*'"

Damian.

Brook said:
good day,

i'm trying to open a form and filter the records based on a check box upon
opening the form...

I know this should be easy, but my mind has run blank..

Can anyone help me?

Thanks,
 
Top