I'm new to access and I'm stuck. I have created a database of our laptops and when someone borrows a laptop. Created a query and a report with the necessary information for a person to sign accepting responsibility when using a laptop. I need to be able to print out the loan agreement for the laptop information that was just entered on the form. When I print I get all the forms that were ever entered for the laptop, not the most recent.
In the query I have entered the following for the criteria:[Forms]![Loans]![SerialNumber]. Furthermore, I have sorted so the most recent and correct entry is the first one to print.
And this is what is entered for the report:
Private Sub equipmentreport_Click()
On Error GoTo Err_equipmentreport_Click
Dim stDocName As String
stDocName = "equipment"
DoCmd.OpenReport stDocName, acPreview
I just don't need all the subsequent records after the most recent. Any assistance will be greatly appreciated.
Thanks in advance.
In the query I have entered the following for the criteria:[Forms]![Loans]![SerialNumber]. Furthermore, I have sorted so the most recent and correct entry is the first one to print.
And this is what is entered for the report:
Private Sub equipmentreport_Click()
On Error GoTo Err_equipmentreport_Click
Dim stDocName As String
stDocName = "equipment"
DoCmd.OpenReport stDocName, acPreview
I just don't need all the subsequent records after the most recent. Any assistance will be greatly appreciated.
Thanks in advance.