cawboy > 28-05-14, 08:26 PM
Xuân Thanh > 29-05-14, 12:15 PM
Xuân Thanh > 29-05-14, 09:29 PM
cawboy > 29-05-14, 11:16 PM
cawboy > 30-05-14, 07:44 PM
Private Sub Option_Click()
Dim Sotang As Integer
Dim strMaHHMax As String
Select Case Option
Case 1:
strMaHHMax = DLookup("[Makhach]", "t_khachhang", "left([Makhach],3)='" & "NCC" & "' And [Stt]=" & DMax("[Stt]", "t_khachhang") & "")
Sotang = Right(strMaHHMax, Len(strMaHHMax) - 3)
Me.txtMakhach = "NCC000" & Sotang + 1
Case 2:
strMaHHMax = DLookup("[Makhach]", "t_khachhang", "left([Makhach],2)='" & "KH" & "' And [Stt]=" & DMax("[Stt]", "t_khachhang") & "")
Sotang = Right(strMaHHMax, Len(strMaHHMax) - 2)
Me.txtMakhach = "KH0000" & Sotang + 1
End Select
Me.txtTenkhach.SetFocus
LstKH.Requery
End Sub
cawboy > 31-05-14, 09:54 PM
Xuân Thanh > 01-06-14, 10:04 AM
Xuân Thanh > 01-06-14, 05:59 PM
...
Select Case Option
Case 1:
Sotang = Dcount("[TenKhach]","t_khachhang", Left([MaKhach], 3) = "NCC")
Me.txtMakhach = "NCC000" & Sotang + 1
...
cawboy > 02-06-14, 02:15 AM