Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21090

error after adding another colum

$
0
0
hey
i just added anoter colum to my DB "ExpInvoice"
and i put the code in the place but something is missing
please tell me what i missed and why?
Code:

CN.Execute "INSERT INTO Expenses " & _
            "(ExpID, ExpDate, ExpType, ExpQuantity, ExpCost, ExpInvoice) VALUES (" & _
            NewID & ", #" & _
            MyDate(PickDate.Value) & "#, '" & _
            RplS(Txt(1).text) & "', " & _
            Replace$(Txt(2).text, ",", ".") & ", " & _
            Replace$(Txt(3).text, ",", ".") & ")"
            Replace$(txt(4).Text, ",", ".") & ")"


Code:

    CN.Execute ("UPDATE Expenses SET " & _
                "ExpDate= #" & MyDate(PickDate.Value) & "#, " & _
                "ExpType= '" & RplS(Txt(1).text) & "', " & _
                "ExpQuantity= " & Replace$(Txt(2).text, ",", ".") & ", " & _
                "ExpCost= " & CCur(Mid$(Txt(3).text, 2)) & _
                "ExpInvoice " & Replace$(txt(4).Text) & "'", ")
                " WHERE ExpID= " & .Tag)

tnx for the help

Viewing all articles
Browse latest Browse all 21090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>