Hi QuickLearner
First, I recommend that you make fdQtrEnd a numeric field (byte) with
values 1 (Jan) ... 12 (Dec). The reason is that there are many
different text representations for month names and abbreviation - Sep,
Sept, September - nevermind all the variations in other languages.
Make your combo box to select the month with two columns:
ControlSource: fdQtrEnd
ColumnCount: 2
BoundColumn: 1
ColumnWidths: 0 (this hides the first column)
RowSourceType: Value List
RowSource: 1;January;2;February ... 12;December
Now, instead of 12 buttons, have a single unbound combo box with a label
"Select by Quarter End:". Make its properties the same as the combo box
above, except for the following:
Name: cboFilterQtrEnd
ControlSource: <blank>
RowSource: 0;<show all>;1;January;2;February ... 12;December
DefaultValue: 0
Finally, use this combo's AfterUpdate event to set the appropriate
filter on the form:
Private Sub cboFilterQtrEnd_AfterUpdate()
If IsNull(cboFilterQtrEnd) then cboFilterQtrEnd = 0
If cboFilterQtrEnd = 0 Then
Me.FilterOn = False
Else
Me.Filter = "fdQtrEnd=" & cboFilterQtrEnd
If Not Me.FilterOn then Me.FilterOn = True
End If
End Sub
--
Good Luck
Graham Mandeno [Access MVP]
Auckland, New Zealand
Hi
I have table with 3 fields and a Form with 12 buttons "Jan, Feb,
March...Dec" Caption
tblClients
fdFirstName
fdLastName
fdQtrEnd // row source is Jan, Feb, March....Dec
frmMenu
I would to make a Button on the Form Say for May month to show me a
Preview of only those Clients who has Quarter end "May" selected in
fdQtrEnd..
how can I do that.
Thanks