will anyone check my coding?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suriacute85
    New Member
    • Jul 2007
    • 6

    #1

    will anyone check my coding?

    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
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    My question is why do you have the intermediary table?

    Comment

    Working...