-- 作者:tommyfung
-- 发布时间:2013/4/24 13:51:00
-- ComboBox 控制 求助
选了 ComboBox1 后, 想更改 Table1.Filter, 但出错.
用那个 Event ( TextChanged 或 ValueChanged )都出错
Dim cb As WinForm.ComboBox messagebox.show(2) cb = e.Form.Controls("ComboBox1") messagebox.show(3)
Dim cbtext As String = cb.text
If cbText = "欠料" Then Tables("备料单分配_备料单分配Table1").Filter = "[POSTED] = TRUE AND [FINISHED] = FALSE and [Tran_date] < #" & Date.Today & "#" ElseIf cbtext = "1天以内" Then Tables("备料单分配_备料单分配Table1").Filter = "[Tran_date] <= \'"&Date.Today.AddDays(1)&"\' And [finished] = False" ElseIf cbtext = "2天以内" Then Tables("备料单分配_备料单分配Table1").Filter = "[Tran_date] <= \'"&Date.Today.AddDays(2)&"\' And [finished] = False" ElseIf cbtext = "3天以内" Then Tables("备料单分配_备料单分配Table1").Filter = "[Tran_date] <= \'"&Date.Today.AddDays(3)&"\' And [finished] = False" ElseIf cbtext = "3天以上" Then Tables("备料单分配_备料单分配Table1").Filter = "[Tran_date] > \'"&Date.Today.AddDays(3)&"\' And [finished] = False" End If
此主题相关图片如下:qq截图20130424134003.jpg
|