G
Guest
I need to print olny the current selected record on my form to a report. I'm
using the following code:
Private Sub cmdPrintCurrentFA_Click()
On Error GoTo Err_cmdPrintCurrentReport_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "rptFinancialAssesment"
DoCmd.OpenReport "rptFinancialAssesment", , ,
"[infSSN]=Forms!frmFinancialAssesment!infSSN"
Exit_cmdPrintCurrentReport_Click:
Exit Sub
Err_cmdPrintCurrentReport_Click:
MsgBox Err.Description
Resume Exit_cmdPrintCurrentReport_Click
End Sub
---
When I print it prompts me for input. the msg box says
"Forms!frmFinancialAssesment!infSSN"
I'm guessing it want me to input the infSSN (social security number, which
is the primary key) Any way i can just get it to print the report for the
current selected record without inputing anything?
using the following code:
Private Sub cmdPrintCurrentFA_Click()
On Error GoTo Err_cmdPrintCurrentReport_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "rptFinancialAssesment"
DoCmd.OpenReport "rptFinancialAssesment", , ,
"[infSSN]=Forms!frmFinancialAssesment!infSSN"
Exit_cmdPrintCurrentReport_Click:
Exit Sub
Err_cmdPrintCurrentReport_Click:
MsgBox Err.Description
Resume Exit_cmdPrintCurrentReport_Click
End Sub
---
When I print it prompts me for input. the msg box says
"Forms!frmFinancialAssesment!infSSN"
I'm guessing it want me to input the infSSN (social security number, which
is the primary key) Any way i can just get it to print the report for the
current selected record without inputing anything?