maidinhdan > 19-05-21, 09:37 PM
'1. Textbox Danh sach: ___________________________________________________________
Private Sub txtDanhsach_Change()
Ham_SQLtoListbox "tblNoinhan", "Noinhan" ' Ten table va TenCot chua danh sach can dua vao Listbox
End Sub
Private Sub txtDanhsach_KeyDown(KeyCode As Integer, Shift As Integer)
ingKeyCode = KeyCode
SukienTextBox 3
End Sub
Private Sub txtDanhsach_GotFocus() 'Khi con tro vua den
Set TenTextbox = Me.txtDanhsach ' Ten Textbox can hung lay danh sach
Set TenListbox = Me.lstDanhsachChon ' Mac dinh khong thay doi
SukienTextBox 1
End Sub
' Nap danh sach cu vao bo nho tam cua Textbox nay
Private Sub txtDanhsach_LostFocus() 'Khi con tro roi khoi
SukienTextBox 2
End Sub
'2.ListBox Danh sach___________________________________________________________________________________________
Private Sub lstDanhsachChon_GotFocus() 'Khi con tro vua den
Ham_Height_ListBox
End Sub
Private Sub lstDanhsachChon_LostFocus() 'Khi con tro roi khoi
lstDanhsachChon.Height = 0
End Sub
Private Sub lstDanhsachChon_DblClick(Cancel As Integer)
Ham_LayDStrongListbox
End Sub
Private Sub lstDanhsachChon_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
ingKeyCode = KeyCode
SukienListBox 3
End Sub
'_______________________________________________________________________________________________end: 2.ListBox
Option Compare Database
Public strOldText As String
Public ingKeyCode As Integer
Public TenTextbox As TextBox
Public TenListbox As ListBox
'Mo ta Chuc nang Ham: ______________________________________
Public Function Ham_LayDStrongListbox() As String
On Error GoTo Loi
Dim item As Variant
Dim strChon As String
If TenListbox.ItemsSelected.Count <> 0 Then 'Neu co chon dòng thi moi xu ly'
'Duyet lay String tat ca dong dang chon
For Each item In TenListbox.ItemsSelected
strChon = strChon & TenListbox.ItemData(item) & ", "
Next item
Else
Exit Function
End If
strChon = Left$(strChon, Len(strChon) - 2) 'Bo 2 ky tu ", "
Ham_LayDStrongListbox = strOldText & strChon
TenTextbox.Value = Ham_LayDStrongListbox
TenTextbox.SetFocus
Exit_Loi:
Exit Function
Loi: ' Khi cac Thu tuc loi se nhay den dong duoi day
MsgBox "Mo ta chi tiet noi dung loi ham", vbCritical, "Loi Ham: [Ham_LayDStrongListbox] thuoc Module: ChonDSforTextbox"
Resume Exit_Loi ' Chay nguoc len dong Exit_Loi: va thoat
End Function
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : Ham_SQLtoListbox
' Tao tren may PC : HENDAN
' Author/ Tac gia : maidinhdan@gmail.com , Ngay, gio tao: 19/05/2021 1:48:30 PM
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung :
' --------------------------------------------------------------------------------------------------------
Public Function Ham_SQLtoListbox(Optional TenTable As String = "", Optional TenCotTable As String = "") As String
On Error GoTo Loi
Dim strTimKiem As String
Dim strNoidungTextbox As String
strNoidungTextbox = TenTextbox.Text
If Len(strNoidungTextbox) = 0 Or ingKeyCode <> vbKeySpace Then Exit Function 'Neu Textbox khong co gi hoac khong nhan phim Space thi thoat ham
' Tach lay chuoi tim kiem
If InStrRev(strNoidungTextbox, ",") > 0 Then
strTimKiem = Trim(Right(strNoidungTextbox, Len(strNoidungTextbox) - InStrRev(strNoidungTextbox, ",")))
Else
strTimKiem = Trim(strNoidungTextbox)
End If
If Len(strTimKiem) = 0 Then Exit Function ' Neu chuoi tim rong thi ket thuc ham
'Loai ra khoi danh sach nhung noi dung da co: cuoi cung se tao ra chuoi SQL cho RowSource cua ListBox
'1. Tao mang
Dim Mang As Variant, str As String, SoLuongMang As Integer, i As Integer, dk As String
If IsNull(strNoidungTextbox) Then Exit Function
str = Nz(strNoidungTextbox)
Mang = Split(str, ",")
SoLuongMang = UBound(Mang)
'WHERE TrieuChung<>"Cao Dat Tho" And TrieuChung<>"Duong Thi Bich" And TrieuChung Like "*Dang Thanh*"
'2. Tach manh cach nhau dau phay de hinh thanh chuoi WHERE
For i = 0 To SoLuongMang
If i = SoLuongMang Then
dk = dk & "TenCotNoiNhan Like " & """*" & Trim(Mang(i)) & "*"""
Else
dk = dk & "TenCotNoiNhan<>" & """" & Trim(Mang(i)) & """ AND "
End If
Next
Erase Mang ' giai phong bo nho duoc phan bo cho cac bien mang
'3. Chuoi SQL hoan chinh
If TenTable <> "" Then
SQL = "SELECT TenCotNoiNhan FROM tblTableChuaDanhsach GROUP BY TenCotNoiNhan, TenCotNoiNhan HAVING "
dk = SQL & dk
dk = Replace(Replace(dk, "TenCotNoiNhan", TenCotTable), "tblTableChuaDanhsach", TenTable)
Else
SQL = "SELECT NoiNhan FROM tblNoinhan GROUP BY NoiNhan, NoiNhan HAVING "
dk = SQL & dk
dk = Replace(dk, "TenCotNoiNhan", "NoiNhan")
End If
'4. Nap SQL vao Listbox
' Debug.Print dk
'SELECT Noinhan FROM tblListNoinhan GROUP BY Noinhan, Noinhan HAVING Noinhan Like "*Thu´y*" ORDER BY Noinhan
SQL_LocDanhsach = dk
With TenListbox
.RowSource = dk
.Requery
Ham_Height_ListBox 'Chinh lai do cao theo so luong co trong danh sach
.Visible = True
End With
Exit_Loi:
Exit Function
Loi: ' Khi cac Thu tuc loi se nhay den dong duoi day
MsgBox "Mo ta chi tiet noi dung loi ham", vbCritical, "Loi Ham: [SQL_LocDanhsach] thuoc Module: ChonDSforTextbox"
Resume Exit_Loi ' Chay nguoc len dong Exit_Loi: va thoat
End Function
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : Ham_Height_ListBox
' Tao tren may PC : HENDAN
' Author/ Tac gia : maidinhdan@gmail.com , Ngay, gio tao: 19/05/2021 1:57:40 PM
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung : Canh do cao cua danh sach trong Listbox
' --------------------------------------------------------------------------------------------------------
Public Sub Ham_Height_ListBox()
Dim ListControl As Control
Set ListControl = TenListbox
With ListControl
If .ListCount <= 14 Then
' .ListRows = .ListCount
.Height = 300 * .ListCount
Else
.Height = 2300 + 2300
End If
End With
End Sub
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : Ham_AnHienListbox
' Tao tren may PC : HENDAN
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung : An hien va chinh kich thuoc Listbox = Textbox da goi
' --------------------------------------------------------------------------------------------------------
Public Sub Ham_AnHienListbox(Hien_An As String)
With TenListbox
Select Case Hien_An
Case "Hien"
.Height = 1200
.Visible = True
Case "An"
.Height = 0
.Visible = False
Case Else
.Top = TenTextbox.Top + TenTextbox.Height ' Do cao
.Left = TenTextbox.Left 'Canh trai
.Width = TenTextbox.Width 'Do rong
End Select
End With
End Sub
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : SukienTextBox
' Tao tren may PC : HENDAN
' Author/ Tac gia : maidinhdan@gmail.com , Ngay, gio tao: 19/05/2021 2:03:19 PM
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung : Rut gon code trong Form
' --------------------------------------------------------------------------------------------------------
Public Sub SukienTextBox(Lenh As Byte)
Select Case Lenh
Case 1 'Duoc dung khi: Khi con tro vua den
TenTextbox.SelStart = TenTextbox.SelLength 'Cho con tro nhay de ky tu cuoi cung cua Textbox
Ham_AnHienListbox "Khac"
Case 2 'Duoc dung khi: Khi con tro roi khoi
'Nap Noi dung cu vao bien strOldText: loai tru phan moi go tim kiem
If Nz(TenTextbox.Text, "") = "" Or ingKeyCode = 13 Then Exit Sub
If InStrRev(TenTextbox.Text, ",") > 0 Then
strOldText = Left(TenTextbox.Text, InStrRev(TenTextbox.Text, ",")) & " "
Else
strOldText = ""
End If
Case 3 'Duoc dung khi: Khi nhan phim
Select Case ingKeyCode
Case vbKeyReturn ' Khi Enter
Ham_AnHienListbox "An" 'An Listbox va nhay sang Textbox ke tiep
Case 40 ' Khi nhan phim Space: nhay den Listbox
TenListbox.SetFocus
Case Else
End Select
Case Else ' Dieu kiem con lai
End Select
End Sub
Public Sub SukienListBox(Lenh As Byte)
On Error Resume Next
Dim i As Integer
Select Case Lenh
Case 3 ' Khi nhan phim
Select Case ingKeyCode
Case vbKeyReturn ' Khi nhan Enter se lay danh sach dang chon nap vao Textbox da goi Listbox nay
Ham_LayDStrongListbox
Case vbKeyA 'Khi nhan phim A chon tat ca danh sach dang hien thi
For i = 0 To TenListbox.ListCount - 1
TenListbox.Selected(i) = True
Next
Case vbKeyC 'Khi nhan phim C bo chon tat ca danh sach dang hien thi
For i = 0 To TenListbox.ListCount - 1
TenListbox.Selected(i) = False
Next
Case Else
End Select
Case Else ' Dieu kiem con lai
End Select
End Sub
'II. Phan chen vao Form________________+++++++++++++++++++++++++++++++++++++++++++++++
''1. Textbox Danh sach: Noinhan ___________________________________________________________
'Private Sub Noinhan_Change()
' Ham_SQLtoListbox "tblListNoibanhanh", "Noibanhanhvanban" ' Ten table va TenCot chua danh sach can dua vao Listbox
'End Sub
'
'Private Sub Noinhan_KeyDown(KeyCode As Integer, Shift As Integer)
' ingKeyCode = KeyCode
' SukienTextBox 3
'End Sub
'Private Sub Noinhan_GotFocus() 'Khi con tro vua den
' Set TenTextbox = Me.Noinhan ' Ten Textbox can hung lay danh sach
' Set TenListbox = Me.lstDanhsachChon ' Mac dinh khong thay doi
' SukienTextBox 1
'End Sub
'' Nap danh sach cu vao bo nho tam cua Textbox nay
'Private Sub Noinhan_LostFocus() 'Khi con tro roi khoi
' SukienTextBox 2
'End Sub
''_______________________________________________________________________________________________end: 1. Textbox
'
''2.ListBox Danh sach___________________________________________________________________________________________
'Private Sub lstDanhsachChon_GotFocus() 'Khi con tro vua den
' Ham_Height_ListBox
'End Sub
'
'Private Sub lstDanhsachChon_LostFocus() 'Khi con tro roi khoi
' lstDanhsachChon.Height = 0
'End Sub
'
'Private Sub lstDanhsachChon_DblClick(Cancel As Integer)
' Ham_LayDStrongListbox
'End Sub
'
'Private Sub lstDanhsachChon_KeyDown(KeyCode As Integer, Shift As Integer)
' ingKeyCode = KeyCode
' SukienListBox 3
'End Sub
''_______________________________________________________________________________________________end: 2.ListBox
ledangvan > 19-05-21, 11:14 PM
huuduy.duy > 20-05-21, 08:46 AM
hmhieu > 20-05-21, 05:07 PM
(19-05-21, 09:37 PM)maidinhdan Đã viết: Trước đây có bài : [Help] Tự động tìm kiếm và điền thông tin trong textbox, cách nhau dấu phẩy " ," [Tác giả: ongke+MTNQ] trên nền tảng bài viết này tôi phát triển để các bạn có thể tái sử dụng code dễ dàng hơn.
Chức năng:
- Tạo ra Textbox tìm kiếm tương tự Combobox có từ gợi ý, cứ mỗi khi có đánh dấu phẩy nó tự động xổ ra một danh sách gợi ý
- Chọn nhiều dòng cùng lúc ( Combox chỉ cho phép chọn 1)
- Lọc bỏ từ đã chọn trong danh sách trước đó.
- Linh động trong việc tái sử dụng code:
- Áp dụng cho bất kỳ table nào: với công thức đơn giản:
* Các phím tắt của Listbox: Phím A: chọn tất cả; Phím C bỏ chọn tất cả
Video hướng dẫn sử dụng.
* Code cho Textbox: Thay đổi theo tên textbox của bạn: 5 chỗ
Mã PHP:'1. Textbox Danh sach: ___________________________________________________________
Private Sub txtDanhsach_Change()
Ham_SQLtoListbox "tblNoinhan", "Noinhan" ' Ten table va TenCot chua danh sach can dua vao Listbox
End Sub
Private Sub txtDanhsach_KeyDown(KeyCode As Integer, Shift As Integer)
ingKeyCode = KeyCode
SukienTextBox 3
End Sub
Private Sub txtDanhsach_GotFocus() 'Khi con tro vua den
Set TenTextbox = Me.txtDanhsach ' Ten Textbox can hung lay danh sach
Set TenListbox = Me.lstDanhsachChon ' Mac dinh khong thay doi
SukienTextBox 1
End Sub
' Nap danh sach cu vao bo nho tam cua Textbox nay
Private Sub txtDanhsach_LostFocus() 'Khi con tro roi khoi
SukienTextBox 2
End Sub
* Code dành cho Listbox: Không thay đổi gì cả chỉ cần copy vào Form
Mã PHP:'2.ListBox Danh sach___________________________________________________________________________________________
Private Sub lstDanhsachChon_GotFocus() 'Khi con tro vua den
Ham_Height_ListBox
End Sub
Private Sub lstDanhsachChon_LostFocus() 'Khi con tro roi khoi
lstDanhsachChon.Height = 0
End Sub
Private Sub lstDanhsachChon_DblClick(Cancel As Integer)
Ham_LayDStrongListbox
End Sub
Private Sub lstDanhsachChon_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
ingKeyCode = KeyCode
SukienListBox 3
End Sub
'_______________________________________________________________________________________________end: 2.ListBox
* Tạo mới Modules và copy vào đó
Mã PHP:Option Compare Database
Public strOldText As String
Public ingKeyCode As Integer
Public TenTextbox As TextBox
Public TenListbox As ListBox
'Mo ta Chuc nang Ham: ______________________________________
Public Function Ham_LayDStrongListbox() As String
On Error GoTo Loi
Dim item As Variant
Dim strChon As String
If TenListbox.ItemsSelected.Count <> 0 Then 'Neu co chon dòng thi moi xu ly'
'Duyet lay String tat ca dong dang chon
For Each item In TenListbox.ItemsSelected
strChon = strChon & TenListbox.ItemData(item) & ", "
Next item
Else
Exit Function
End If
strChon = Left$(strChon, Len(strChon) - 2) 'Bo 2 ky tu ", "
Ham_LayDStrongListbox = strOldText & strChon
TenTextbox.Value = Ham_LayDStrongListbox
TenTextbox.SetFocus
Exit_Loi:
Exit Function
Loi: ' Khi cac Thu tuc loi se nhay den dong duoi day
MsgBox "Mo ta chi tiet noi dung loi ham", vbCritical, "Loi Ham: [Ham_LayDStrongListbox] thuoc Module: ChonDSforTextbox"
Resume Exit_Loi ' Chay nguoc len dong Exit_Loi: va thoat
End Function
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : Ham_SQLtoListbox
' Tao tren may PC : HENDAN
' Author/ Tac gia : maidinhdan@gmail.com , Ngay, gio tao: 19/05/2021 1:48:30 PM
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung :
' --------------------------------------------------------------------------------------------------------
Public Function Ham_SQLtoListbox(Optional TenTable As String = "", Optional TenCotTable As String = "") As String
On Error GoTo Loi
Dim strTimKiem As String
Dim strNoidungTextbox As String
strNoidungTextbox = TenTextbox.Text
If Len(strNoidungTextbox) = 0 Or ingKeyCode <> vbKeySpace Then Exit Function 'Neu Textbox khong co gi hoac khong nhan phim Space thi thoat ham
' Tach lay chuoi tim kiem
If InStrRev(strNoidungTextbox, ",") > 0 Then
strTimKiem = Trim(Right(strNoidungTextbox, Len(strNoidungTextbox) - InStrRev(strNoidungTextbox, ",")))
Else
strTimKiem = Trim(strNoidungTextbox)
End If
If Len(strTimKiem) = 0 Then Exit Function ' Neu chuoi tim rong thi ket thuc ham
'Loai ra khoi danh sach nhung noi dung da co: cuoi cung se tao ra chuoi SQL cho RowSource cua ListBox
'1. Tao mang
Dim Mang As Variant, str As String, SoLuongMang As Integer, i As Integer, dk As String
If IsNull(strNoidungTextbox) Then Exit Function
str = Nz(strNoidungTextbox)
Mang = Split(str, ",")
SoLuongMang = UBound(Mang)
'WHERE TrieuChung<>"Cao Dat Tho" And TrieuChung<>"Duong Thi Bich" And TrieuChung Like "*Dang Thanh*"
'2. Tach manh cach nhau dau phay de hinh thanh chuoi WHERE
For i = 0 To SoLuongMang
If i = SoLuongMang Then
dk = dk & "TenCotNoiNhan Like " & """*" & Trim(Mang(i)) & "*"""
Else
dk = dk & "TenCotNoiNhan<>" & """" & Trim(Mang(i)) & """ AND "
End If
Next
Erase Mang ' giai phong bo nho duoc phan bo cho cac bien mang
'3. Chuoi SQL hoan chinh
If TenTable <> "" Then
SQL = "SELECT TenCotNoiNhan FROM tblTableChuaDanhsach GROUP BY TenCotNoiNhan, TenCotNoiNhan HAVING "
dk = SQL & dk
dk = Replace(Replace(dk, "TenCotNoiNhan", TenCotTable), "tblTableChuaDanhsach", TenTable)
Else
SQL = "SELECT NoiNhan FROM tblNoinhan GROUP BY NoiNhan, NoiNhan HAVING "
dk = SQL & dk
dk = Replace(dk, "TenCotNoiNhan", "NoiNhan")
End If
'4. Nap SQL vao Listbox
' Debug.Print dk
'SELECT Noinhan FROM tblListNoinhan GROUP BY Noinhan, Noinhan HAVING Noinhan Like "*Thu´y*" ORDER BY Noinhan
SQL_LocDanhsach = dk
With TenListbox
.RowSource = dk
.Requery
Ham_Height_ListBox 'Chinh lai do cao theo so luong co trong danh sach
.Visible = True
End With
Exit_Loi:
Exit Function
Loi: ' Khi cac Thu tuc loi se nhay den dong duoi day
MsgBox "Mo ta chi tiet noi dung loi ham", vbCritical, "Loi Ham: [SQL_LocDanhsach] thuoc Module: ChonDSforTextbox"
Resume Exit_Loi ' Chay nguoc len dong Exit_Loi: va thoat
End Function
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : Ham_Height_ListBox
' Tao tren may PC : HENDAN
' Author/ Tac gia : maidinhdan@gmail.com , Ngay, gio tao: 19/05/2021 1:57:40 PM
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung : Canh do cao cua danh sach trong Listbox
' --------------------------------------------------------------------------------------------------------
Public Sub Ham_Height_ListBox()
Dim ListControl As Control
Set ListControl = TenListbox
With ListControl
If .ListCount <= 14 Then
' .ListRows = .ListCount
.Height = 300 * .ListCount
Else
.Height = 2300 + 2300
End If
End With
End Sub
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : Ham_AnHienListbox
' Tao tren may PC : HENDAN
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung : An hien va chinh kich thuoc Listbox = Textbox da goi
' --------------------------------------------------------------------------------------------------------
Public Sub Ham_AnHienListbox(Hien_An As String)
With TenListbox
Select Case Hien_An
Case "Hien"
.Height = 1200
.Visible = True
Case "An"
.Height = 0
.Visible = False
Case Else
.Top = TenTextbox.Top + TenTextbox.Height ' Do cao
.Left = TenTextbox.Left 'Canh trai
.Width = TenTextbox.Width 'Do rong
End Select
End With
End Sub
' --------------------------------------------------------------------------------------------------------
' Ten Modules/Class: mod_ChonDSforTextbox
' Ten ham/thu tuc : SukienTextBox
' Tao tren may PC : HENDAN
' Author/ Tac gia : maidinhdan@gmail.com , Ngay, gio tao: 19/05/2021 2:03:19 PM
' Parameters/Tham so :
' Cu phap/ Purpose :
' Pham vi ap dung : Rut gon code trong Form
' --------------------------------------------------------------------------------------------------------
Public Sub SukienTextBox(Lenh As Byte)
Select Case Lenh
Case 1 'Duoc dung khi: Khi con tro vua den
TenTextbox.SelStart = TenTextbox.SelLength 'Cho con tro nhay de ky tu cuoi cung cua Textbox
Ham_AnHienListbox "Khac"
Case 2 'Duoc dung khi: Khi con tro roi khoi
'Nap Noi dung cu vao bien strOldText: loai tru phan moi go tim kiem
If Nz(TenTextbox.Text, "") = "" Or ingKeyCode = 13 Then Exit Sub
If InStrRev(TenTextbox.Text, ",") > 0 Then
strOldText = Left(TenTextbox.Text, InStrRev(TenTextbox.Text, ",")) & " "
Else
strOldText = ""
End If
Case 3 'Duoc dung khi: Khi nhan phim
Select Case ingKeyCode
Case vbKeyReturn ' Khi Enter
Ham_AnHienListbox "An" 'An Listbox va nhay sang Textbox ke tiep
Case 40 ' Khi nhan phim Space: nhay den Listbox
TenListbox.SetFocus
Case Else
End Select
Case Else ' Dieu kiem con lai
End Select
End Sub
Public Sub SukienListBox(Lenh As Byte)
On Error Resume Next
Dim i As Integer
Select Case Lenh
Case 3 ' Khi nhan phim
Select Case ingKeyCode
Case vbKeyReturn ' Khi nhan Enter se lay danh sach dang chon nap vao Textbox da goi Listbox nay
Ham_LayDStrongListbox
Case vbKeyA 'Khi nhan phim A chon tat ca danh sach dang hien thi
For i = 0 To TenListbox.ListCount - 1
TenListbox.Selected(i) = True
Next
Case vbKeyC 'Khi nhan phim C bo chon tat ca danh sach dang hien thi
For i = 0 To TenListbox.ListCount - 1
TenListbox.Selected(i) = False
Next
Case Else
End Select
Case Else ' Dieu kiem con lai
End Select
End Sub
'II. Phan chen vao Form________________+++++++++++++++++++++++++++++++++++++++++++++++
''1. Textbox Danh sach: Noinhan ___________________________________________________________
'Private Sub Noinhan_Change()
' Ham_SQLtoListbox "tblListNoibanhanh", "Noibanhanhvanban" ' Ten table va TenCot chua danh sach can dua vao Listbox
'End Sub
'
'Private Sub Noinhan_KeyDown(KeyCode As Integer, Shift As Integer)
' ingKeyCode = KeyCode
' SukienTextBox 3
'End Sub
'Private Sub Noinhan_GotFocus() 'Khi con tro vua den
' Set TenTextbox = Me.Noinhan ' Ten Textbox can hung lay danh sach
' Set TenListbox = Me.lstDanhsachChon ' Mac dinh khong thay doi
' SukienTextBox 1
'End Sub
'' Nap danh sach cu vao bo nho tam cua Textbox nay
'Private Sub Noinhan_LostFocus() 'Khi con tro roi khoi
' SukienTextBox 2
'End Sub
''_______________________________________________________________________________________________end: 1. Textbox
'
''2.ListBox Danh sach___________________________________________________________________________________________
'Private Sub lstDanhsachChon_GotFocus() 'Khi con tro vua den
' Ham_Height_ListBox
'End Sub
'
'Private Sub lstDanhsachChon_LostFocus() 'Khi con tro roi khoi
' lstDanhsachChon.Height = 0
'End Sub
'
'Private Sub lstDanhsachChon_DblClick(Cancel As Integer)
' Ham_LayDStrongListbox
'End Sub
'
'Private Sub lstDanhsachChon_KeyDown(KeyCode As Integer, Shift As Integer)
' ingKeyCode = KeyCode
' SukienListBox 3
'End Sub
''_______________________________________________________________________________________________end: 2.ListBox
Ai cần xin để lại Email
cpucloi > 26-05-21, 05:34 AM
maidinhdan > 15-06-21, 09:10 PM
DooHoaangPhuuc > 16-06-21, 12:42 PM
Hồ Bình > 02-12-21, 04:18 PM
dotrung > 25-02-22, 11:19 PM
DooHoaangPhuuc > 02-03-22, 10:57 AM