can you have a code behind a command button to print a record with refference to two fields
example:
field> LastName = Smith
field>Date= 05-01-11
now because mr smith has several orders and they are differentiated
by the date that he made each order (on a subform)
I have created a Report to print out the items ordered
I put a command button on the bottom of the order form
Private Sub Print Form_Click()
Dim strWhere As String
strWhere = "LastName='" & Me.LastName & "'"
DoCmd.OpenReport "ORDER", acViewNoemal, , strWhere
End Sub
this code prints the report with Mr smith but also prints all and every record that has mr smith name
if the code above could be changed to ONLY PRINT the current record being viewed or somehow connect the name with the date
I dont know, I am just looking for an easy fix
ps > had posted simular questions with no answers
just let me know if this can be done
and if so
then could you help with the code
example:
field> LastName = Smith
field>Date= 05-01-11
now because mr smith has several orders and they are differentiated
by the date that he made each order (on a subform)
I have created a Report to print out the items ordered
I put a command button on the bottom of the order form
Private Sub Print Form_Click()
Dim strWhere As String
strWhere = "LastName='" & Me.LastName & "'"
DoCmd.OpenReport "ORDER", acViewNoemal, , strWhere
End Sub
this code prints the report with Mr smith but also prints all and every record that has mr smith name
if the code above could be changed to ONLY PRINT the current record being viewed or somehow connect the name with the date
I dont know, I am just looking for an easy fix
ps > had posted simular questions with no answers
just let me know if this can be done
and if so
then could you help with the code