本人在群内找到一段代码(如下)但代码是按年、月筛选数据的,我想再加上按日筛选的,请问最下面标注红色的代码该怎么下啊?请高手帮忙!
If cbx_niandu.Text <> "" Then
Dim d_start As Date = new Date(Left(cbx_niandu.Text, 4), 1, 1)
Dim d_end As Date = d_start.AddYears(1)
filter += " And 日期 >= #" & d_start & "# And 日期 < #" & d_end & "#"
End If
If cbx_yuefen.Text <> "" Then
Dim d_start As Date = new Date(Left(cbx_niandu.Text, 4), cbx_yuefen.SelectedIndex+ 1, 1)
Dim d_end As Date = d_start.AddMonths(1)
filter += " And 日期 >= #" & d_start & "# And 日期 < #" & d_end & "#"
End If
If cbx_riqi.Text <> "" Then
Dim d_start As Date = new Date(Left(cbx_niandu.Text, 4), (cbx_yuefen.Text,4),cbx_riqi.SelectedIndex+ 1, 1)
Dim d_end As Date = d_start.AddDays(1)
filter += " And 日期 >= #" & d_start & "# And 日期 < #" & d_end & "#"
End If