Option Compare Database
Private Sub BtnAddLine1_Cli ck()
Set db = CurrentDb
Set t = db.OpenRecordse t("T_LogEntry ")
t.Index = "NoInvois"
t.Seek "=", TxtNoInvois
If t.NoMatch Then
t.AddNew
t.NoInvois = TxtNoInvois
t.NoLori = cmdNoLori
t.TarikhHantar = TxtHantar
t.Kawasan = TxtKwsn
t.Update
TxtNoInvois = ""
Else
MsgBox "Invoice No already exist", 16, "Invoice No exist"""
End If
End Sub
Private Sub btnQuit_Click()
DoCmd.OpenForm "F_MAIN"
DoCmd.Close acForm, "F_Entry"
End Sub
Private Sub BtnSave_Click()
Set db = CurrentDb
Set t = db.OpenRecordse t("T_EntryData" )
// i want to save all the data, append from T_LogEntry to T_EntryData. after that delete all the records in T_LogEntry//
DoCmd.Run append Query to ("T_EntryDat a")
DoCmd.Run delete Query ("T_LogEntry ")
End Sub
Private Sub BtnAddLine1_Cli ck()
Set db = CurrentDb
Set t = db.OpenRecordse t("T_LogEntry ")
t.Index = "NoInvois"
t.Seek "=", TxtNoInvois
If t.NoMatch Then
t.AddNew
t.NoInvois = TxtNoInvois
t.NoLori = cmdNoLori
t.TarikhHantar = TxtHantar
t.Kawasan = TxtKwsn
t.Update
TxtNoInvois = ""
Else
MsgBox "Invoice No already exist", 16, "Invoice No exist"""
End If
End Sub
Private Sub btnQuit_Click()
DoCmd.OpenForm "F_MAIN"
DoCmd.Close acForm, "F_Entry"
End Sub
Private Sub BtnSave_Click()
Set db = CurrentDb
Set t = db.OpenRecordse t("T_EntryData" )
// i want to save all the data, append from T_LogEntry to T_EntryData. after that delete all the records in T_LogEntry//
DoCmd.Run append Query to ("T_EntryDat a")
DoCmd.Run delete Query ("T_LogEntry ")
End Sub
Comment