I am not from IT major (material engineering tbh), pardon me if my question is not really clear.
I am currently studying the MS Access 2013, and right now creating a table with details in:
.
The structure of the table is here:
+----+--------+---------+--------------+-----------+---------+-----------+
| ID | Order | Vendor | Attachments | Customer | AWB no | Due Date |
+----+--------+---------+--------------+-----------+---------+-----------+
I created a new form, added a button to open this form and created report with macros, and used it to create a report.
I want to create a report only using data from 1 row of the table, but instead the report contains all data from table, just like the normal report.
Any suggestion how to make 1 report from only data from 1 row?
Please see this for report example:
Update : I tried to follow some instructions for "print one record" and found this VBA code :
Option Compare Database
Private Sub BttnPrint_Click()
Dim strReportName As String
Dim StrCriteria As String
If NewRecord Then
MsgBox "This record contains no data, Please select a record to print or save this record" _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "REPORT"
StrCriteria = "[ID]= " & Me![ID]
DoCmd.OpenReport strReportName, acViewPreview, , StrCriteria
End If
End Sub
This code embedded in the "print" button on the form. This code can create report based on only one record, however I cannot switch to another record, stuck in one record only no matter which record I open. What should I do if I want to create report for another records?