Professional Documents
Culture Documents
Access Prog Codes
Access Prog Codes
Recordset Dim STR2 As String Dim STRX As String Dim WRDUTY As Boolean Dim N1 As Single Dim N2 As Single Dim M1 As Single Dim Y1 As Single
Dim D1 As Date Dim D2 As Date Dim BDATE1 As Date Dim EDATE1 As Date Dim CDATE1 As Date Public SDATE As Date Public RDATE As Date Option Compare Database
Text2.SetFocus Text2.Text = STR1 Label12.Caption = "HO GAYA " Text4.SetFocus Text4.Text = "GOOD" End Sub
End Sub
'BDATE1 = CDate("16-" & CStr(M1 - 1) & "-2010") LabelED.Caption = EDATE1 If M1 = 1 Then M1 = 12 Y1 = Y1 - 1 Else M1 = M1 - 1 End If
LabelBD.Caption = BDATE1
End Sub
Text4.SetFocus D1 = Text4.Value Text6.SetFocus D2 = Text6.Value Text8.SetFocus STR2 = Text8.Value 'rst2.AddNew If N2 = 1 Then If D1 > BDATE1 Then STRX = STR1 SDATE = BDATE1 WRDUTY = True Else WRDUTY = False STRX = STR1 End If rst2.AddNew
rst2.AddNew rst2![SNAME] = STRX rst2![FDATE] = SDATE rst2![TDATE] = D1 - 1 rst2![Type] = "DUTY" rst2.Update STRX = " Else "