jason > 29-07-14, 11:20 AM
changkhoonline77 > 30-07-14, 09:26 AM
If Me.NGAYNHAP <= 2012 Then
If MsgBox("ngay nhap nho hon 2012, vui long xem lai", vbYesNo + vbQuestion, "thong bao") = vbYes Then
Me.NGAYNHAP.SetFocus
Me.NGAYNHAP = ""
End If
End If
jason > 30-07-14, 11:32 AM
(30-07-14, 09:26 AM)changkhoonline77 Đã viết: ở chỗ ngày nhập mục BeforeUpdate cho code này vào
Mã PHP:If Me.NGAYNHAP <= 2012 Then
If MsgBox("ngay nhap nho hon 2012, vui long xem lai", vbYesNo + vbQuestion, "thong bao") = vbYes Then
Me.NGAYNHAP.SetFocus
Me.NGAYNHAP = ""
End If
End If
p/s: chưa kiểm tra code
If Me.IV & "" = "" Or Me.BL & "" = "" Or Me.Shipper & "" = "" Or Me.EmpNo & "" = "" Or Me.IDATE & "" = "" Then
MsgBox "Please check again if you have blank.", vbInformation
Else
If // DCount("BasicStockCD", "STBasicStock", "CloseYear & CloseMonth > '" & Year(IDATE) & Month(IDATE) & "'") Or _
DMin("CloseYear & CloseMonth", "STBasicStock", "CloseYear & CloseMonth > '" & Year(IDATE) & Month(IDATE) & "'")
Year(IDATE) & Month(IDATE) > Year(Now) & Month(Now) Or _
DCount("BasicStockCD", "STBasicStock", "CloseYear & CloseMonth = '" & Year(IDATE) & Month(IDATE) & "'") Then
MsgBox "You can't input GR Data. Because closed your input GR Data." & Chr(13) & Chr(10) & _
"Please inform Your Manager Or IS Team.", vbInformation
Else
DoCmd.SetWarnings False
DoCmd.OpenQuery "SQInFac_Add", , acEdit
[Forms]![SFInFac].[IV] = Me.IV
[Forms]![SFInFac].[List].Requery
DoCmd.Close acForm, "SFInFac_Add"
DoCmd.SetWarnings True
End If
End If
changkhoonline77 > 30-07-14, 10:10 PM
If Me.NGAYNHAP <= ("[NAM]","[tblTHOIGIAN]","[ID]=1") Then
If MsgBox("ngay nhap nho hon 2012, vui long xem lai", vbYesNo + vbQuestion, "thong bao") = vbYes Then
Me.NGAYNHAP.SetFocus
Me.NGAYNHAP = ""
End If
End If
jason > 02-08-14, 04:56 PM