H
h3llz
I want to dump all information within the table and requery the form, and i
get error no current record, please help!
.MoveLast
.MoveFirst
I = 1
Do While I <= .RecordCount
basketID = QryDat.Fields.Item("basketID")
productID = QryDat.Fields.Item("productID")
subtotal = QryDat.Fields.Item("subtotal")
quantity = QryDat.Fields.Item("quantity")
DoCmd.RunSQL ("INSERT INTO tblBasketsContent VALUES
(basketID,productID,subtotal,quantity);")
.MoveNext
I = (I + 1)
Loop
'DoCmd.OpenReport "invoice", acPreview
DoCmd.RunSQL ("UPDATE tblBasketContent SET deleted=True;")
DoCmd.RunSQL ("INSERT INTO tblBaskets (total) VALUES ('0');")
Form.Requery
get error no current record, please help!
.MoveLast
.MoveFirst
I = 1
Do While I <= .RecordCount
basketID = QryDat.Fields.Item("basketID")
productID = QryDat.Fields.Item("productID")
subtotal = QryDat.Fields.Item("subtotal")
quantity = QryDat.Fields.Item("quantity")
DoCmd.RunSQL ("INSERT INTO tblBasketsContent VALUES
(basketID,productID,subtotal,quantity);")
.MoveNext
I = (I + 1)
Loop
'DoCmd.OpenReport "invoice", acPreview
DoCmd.RunSQL ("UPDATE tblBasketContent SET deleted=True;")
DoCmd.RunSQL ("INSERT INTO tblBaskets (total) VALUES ('0');")
Form.Requery