Hi there i have a weired problem that i can´t figure out on my own.
I have a Form with a combobox and 3 checkboxes
now i want to change the Rowsource of the Combobox by clicking on the checkboxes.
When i click the Checkbox the Rowsource gets Changed as i want it but i can not use the new Values cause its giving me the error "The value you entered is not valid for this field"
The Funny thing is its always bound to the type of data i choose first. When i first select the Week i can select only Weeks (17,18,19 etc)
When i choose Day first it only accepts Dates (01.01.2014 etc)
I dont know what I do wrong here. There is no Control Source set if that helps. And the Bound Column for all Sources is 1
Here the Code
DD_Zeitraum is the Combobox
CB_Day CB_Week CB_Month are the Checkboxes
Thanks for your Help
I have a Form with a combobox and 3 checkboxes
now i want to change the Rowsource of the Combobox by clicking on the checkboxes.
When i click the Checkbox the Rowsource gets Changed as i want it but i can not use the new Values cause its giving me the error "The value you entered is not valid for this field"
The Funny thing is its always bound to the type of data i choose first. When i first select the Week i can select only Weeks (17,18,19 etc)
When i choose Day first it only accepts Dates (01.01.2014 etc)
I dont know what I do wrong here. There is no Control Source set if that helps. And the Bound Column for all Sources is 1
Here the Code
DD_Zeitraum is the Combobox
CB_Day CB_Week CB_Month are the Checkboxes
Code:
Private Sub CB_Day_Click()
If Me.CB_Day.Value = -1 Then
Me.CB_Month = 0
Me.CB_Week = 0
Me.DD_Zeitraum = ""
Me.DD_Zeitraum.RowSource = ""
Me.DD_Zeitraum.RowSource = Dist_Datum
Else
Me.CB_Day.Value = -1
End If
End Sub
Private Sub CB_Week_Click()
If Me.CB_Week.Value = -1 Then
Me.CB_Month = 0
Me.CB_Day = 0
Me.DD_Zeitraum = ""
Me.DD_Zeitraum.RowSource = ""
Me.DD_Zeitraum.RowSource = "Dist_Woche"
Else
Me.CB_Week.Value = -1
End If
End Sub
Private Sub CB_Month_Click()
If Me.CB_Month.Value = -1 Then
Me.CB_Week = 0
Me.CB_Day = 0
Me.DD_Zeitraum = ""
Me.DD_Zeitraum.RowSource = ""
Me.DD_Zeitraum.RowSource = "Dist_Month"
Else
Me.CB_Month.Value = -1
End If
End Sub
Thanks for your Help