Hi, I am trying to write a code into my small application but it keeps throwing errors when I compile it (Type Mismatch)
Below is the exact code throwing error at .OpenCurrentdb:
----------------------------------------------------------------------------------------------------------------
Please where am I making the errors?
Below is the exact code throwing error at .OpenCurrentdb:
Code:
Set dbs = CurrentDb
Set rs = CurrentDb.OpenRecordset("SELECT tblItem.QtyAvail, tblItem.UnitSale, tblClient.ClientAcc, tblOutbound.ClientID, tblOutbound.QtyOut, tblOutbound.AmountRecorded FROM tblItem INNER JOIN (tblClient INNER JOIN tblOutbound ON tblClient.ClientID = tblOutbound.ClientID) ON tblItem.ItemID = tblOutbound.ItemID WHERE (((tblOutbound.InvoiceNo) = '" & [Forms]![frmPoS]![InvoiceNo]) & "'"
Do While Not rs.EOF
rs.Edit
rs!ClientID = Me!Client
rs!QtyAvail = rs!QtyAvail - rs!QtyOut
rs!UnitSale = rs!ExtendedPrice
rs!ClientAcc = rs!ClientAcc + rs!AmountRecorded
rs.Update
rs.MoveNext
Loop
rs.Close
Please where am I making the errors?
Last edited by a moderator: