I have 5 combo boxes which represent certain periods.
The row source of these 5 combo boxes is table tblRefDate.
What I want to do is to make a procedure that when period is inserted in any of these combos will limit periods
shown in other combo boxes, ie. it will exclude the period or periods which are already shown
in one or more of other combos.
I was thinking about making 5 functions and puting them respectively in ROW SOURCE property of the periods.
I was imagining that function should look something like this code under, but I'm still struggling a lot with writing
the string correctly.
Period1 - Row Source: fRow_Period1
Tnx.
The row source of these 5 combo boxes is table tblRefDate.
What I want to do is to make a procedure that when period is inserted in any of these combos will limit periods
shown in other combo boxes, ie. it will exclude the period or periods which are already shown
in one or more of other combos.
I was thinking about making 5 functions and puting them respectively in ROW SOURCE property of the periods.
I was imagining that function should look something like this code under, but I'm still struggling a lot with writing
the string correctly.
Period1 - Row Source: fRow_Period1
Code:
Public Function fRow_Period1() Dim sRow1 as String sRow1 = "SELECT tblRefDate.RefDate from tblRefDate WHERE [RefDate] <>" _ & me.cboPeriod1 & "WHERE [RefDate] <>" & me.cboPeriod2 & WHERE [RefDate] <>" & me.cboPeriod3 fRow_Period1 = sRow1 End Function
Comment