C
capinvest
I have a database of clients set up. Each client has a
unique id number. I am trying to print a report using
only the current clients information, which is on the form
that I am placing the button. This is what I have so far:
Private Sub Print_SituationF_Button_Click()
On Error GoTo Err_Print_SituationF_Button_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "Situation"
stWhere = "id=" & Me![*ID]
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_Print_SituationF_Button_Click:
Exit Sub
I think that I use the openreport where condition, but I
am not sure how to retrieve the correct client ID.
If anyone can help, I would be very grateful.
Thanks
unique id number. I am trying to print a report using
only the current clients information, which is on the form
that I am placing the button. This is what I have so far:
Private Sub Print_SituationF_Button_Click()
On Error GoTo Err_Print_SituationF_Button_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "Situation"
stWhere = "id=" & Me![*ID]
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_Print_SituationF_Button_Click:
Exit Sub
I think that I use the openreport where condition, but I
am not sure how to retrieve the correct client ID.
If anyone can help, I would be very grateful.
Thanks