Hi I hope you all can help me.
I have created a form with a subform for training. The database works great and I'm close to finishing it. One of the issues I have now come across is printing a single record from the form. The VBA I use is:
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[Part Number]
DoCmd.OpenReport "Skills Matrix", acViewPreview, , strWhere
End If
This works great, but will only give me the first entry off of the subform, when I want all of the entry's on the current subform.
At the moment I can either get the first entry from the subform or all the entry's for all the items. I want it to print for the current item with all people listed on the current subform.
Any help would be great. I've attached the file to look at as well. The form with the command button is the Operator Skills form.
Thank you again.
I have created a form with a subform for training. The database works great and I'm close to finishing it. One of the issues I have now come across is printing a single record from the form. The VBA I use is:
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[Part Number]
DoCmd.OpenReport "Skills Matrix", acViewPreview, , strWhere
End If
This works great, but will only give me the first entry off of the subform, when I want all of the entry's on the current subform.
At the moment I can either get the first entry from the subform or all the entry's for all the items. I want it to print for the current item with all people listed on the current subform.
Any help would be great. I've attached the file to look at as well. The form with the command button is the Operator Skills form.
Thank you again.