hey
im getting a error every time i try to update a field " syntax error missing in query expression"
i checked the code i dont know whats wrong.
this is the code when i load the form
and this is when i edit , i get the errorCode:Private Sub Form_Load() Me.WindowState = 2 LsVw.ColumnHeaders(1).Icon = "asc" Set RS = CN.Execute("SELECT * FROM Expenses ORDER BY ExpDate") While Not RS.EOF Set Itm = LsVw.ListItems.Add(, , Format(RS!ExpDate, "dd/mm/yyyy"), , "dolar") Itm.Tag = RS!ExpID Itm.SubItems(1) = RS!ExpType Itm.SubItems(2) = RS!ExpQuantity Itm.SubItems(3) = FormatCurrency(RS!ExpCost) RS.MoveNext Wend ListRTL LsVw mLVClrHdr.HookToLV LsVw.hwnd, True mLVClrHdr.glHdrBkClr = &HD1B499 mLVClrHdr.glHdrTextClr = vbWhite m_hookedLV = True End Sub
tnx for the helpCode:CN.Execute ("UPDATE Expenses SET " & _ "ExpDate= #" & MyDate(PickDate.Value) & "#, " & _ "ExpType= '" & RplS(txt(1).text) & "', " & _ "ExpQuantity= " & Replace$(txt(2).text, ",", ".") & ", " & _ "ExpCost= " & Replace$(txt(3).text, ",", ".") & _ " WHERE ExpID= " & .Tag)




Reply With Quote