Hi folks. Desperate and weekend in sight, i can not stop until i fix this. Please bear with me...
- I am on a subform that fetches some data from excel files. (Functions like a search form)
- With the submit button, i put the search results into the table with a recordset. (code below)
ALL THIS WORKS FINE! Now, i want to print a report. From the same record im just added with the code below.
How can i do this? As im not currently on a form that has no record_ID (because its for searching only)
How do i print out the form, with the current "item_ID" (the one i just added)
Private Sub Submit_Click()
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("Select * from inboundreturns_items")
rec.AddNew
rec("returnID") = Forms!inboundreturns.returnID.Value
rec("ireq") = Me.ireq
rec("item") = Me.item
rec("tasknumber") = Me.tasknumber
rec("country") = Me.country
rec("engineername") = Me.engineer
rec("connote") = Me.connote
rec("status") = Me.status
rec.Update
Set rec = Nothing
Set db = Nothing
End Sub
(FYI: The report is based on the table inboundreturns_items)