By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Returning orders

P: n/a

When returning an order,
I have the following code:

strOlinje = "INSERT INTO tblReturn
(RetOrdernr,RetDate,RetTime,RetCustID,RetEmployeeI D,RetDescription,RetPrinted,
RetReturn,RetReturnr,RetReturDate) " _
Ordernr,myDate,myTime,CustID,EmployeeID,Descriptio n,myPrinted,Return,Returnr,ReturDate
" _
& "FROM tblOrders " _
& "WHERE OrderID = " & Forms!frmOrder!OrderID
CurrentDb.Execute strOlinje

'Now insert the orderlines...

strDelOlinje = "INSERT INTO tblReturnorderlines
(RetOrdreID,RetVareID,RetPris,RetMengde,RetRabatt, RetMiljoavg,RetReturnert)
" _
OrdreID,VareID,Pris,Mengde,Rabatt,Miljoavg,Returne rt " _
& "FROM tblDelordrer " _
& "WHERE Returnert = true AND OrdreID = " &
CurrentDb.Execute strDelOlinje

Now this works fine, doesn't do the insert in the

However, when I run a query against this table, I'll get the desired
result. It has inserted the data.

What is going on here?

Is this the way to do it or am I way out on the marshes?


Dec 14 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.