Noname > 31-08-19, 11:04 AM
dotrung > 22-11-21, 05:11 PM
ongke0711 > 23-11-21, 12:58 PM
dotrung > 24-11-21, 10:51 PM
thuc1605ls > 15-05-22, 02:59 PM
ongke0711 > 15-05-22, 05:13 PM
(15-05-22, 02:59 PM)thuc1605ls Đã viết: Xin hỏi ongke0711: nếu nguồn Combobox lấy từ SQL bằng ADDB thì chỉnh code nhue nào ạ ? Xin cảm ơn ạ
Public Sub InitalizeFilterCombo(faytComBoName As Access.ComboBox, FilterFieldName As String, Optional MoveToCtl As Control)
On Error GoTo errHandler
If Not faytComBoName.RowSourceType = "Table/Query" Then
MsgBoxUni "Class ch" & ChrW(7881) & " ho" & ChrW(7841) & "t " & ChrW(273) & ChrW(7897) & "ng khi Combobox có RowSource là Table ho" & ChrW(7863) & "c Query."
Exit Sub
End If
'/Ket noi SQL Sv lay Recordset lam nguon cho ComboBox
... code tao ADODB recordset "rsADO"
Set faytComBoName.Recordset = rsADO
...
...
End Sub
thuc1605ls > 18-05-22, 02:55 PM
thuc1605ls > 19-05-22, 01:21 PM
ongke0711 > 23-05-22, 01:02 AM
(19-05-22, 01:21 PM)thuc1605ls Đã viết: Mình vẫn chưa gán nguồn cho Combo trong Public đc. Ongke0711 hướng dẫn mình nhé.