Filter Option Group

Sharon Hague

Registered User.
Local time
Today, 23:14
Joined
Jul 10, 2003
Messages
138
Hi All

I have a subform which I want to apply a option group to to filter records.

My Option Group is called FilterOptions and has at the minute 2 options which are All Dates & 2003.

When I click on any of these options I want it to filter all entries on whatever I choose.

Therefore I have entered the following code in my after update event of my option box properties: -

If FilterOptions = 2 Then
Me.Filter = "MyYear = '2003'"
Me.FilterOn = True
Else
Me.FilterOn = False
End If

When I view my form the option group items are shaded out and I cannot perform the filter.

I can get this to work in a normal form, however I cannot get this to work in my main form which is connected to a subform or my subform itself. - Is this not possible?

I'd appreciate anybody's help on this.
 
When I view my form the option group items are shaded out and I cannot perform the filter.

That seems strange, is the option group bound in some way? I hope not..

can you post your problem in a sample? It seems hard to "fake" in order to test....

Regards
 
Sharon Hague said:
When I view my form the option group items are shaded out and I cannot perform the filter.

Have you, by chance, set the option group's Enabled property to False?
 
Mailman & Mile-O-Phile

Thanks v much for your reply.

It's driven me nuts! as I knew I had the code etc all correct. I suddenly had a thought :confused: and all it was was that I had my subform set to datasheet.

Why I didn't think of that before god knows!

Thanks all the same

:)
 

Users who are viewing this thread

Back
Top Bottom