Alguém poderia me ajudar neste código. este dando erro na linha em destaque.
Private Sub Report_Open(Cancel As Integer)
Dim intX As Integer
Dim qdf As QueryDef
Dim frm As Form
Set dbsReport = CurrentDb
Set frm = Forms!FTP
Set qdf = dbsReport.QueryDefs("TESTEP")
qdf.Parameters("Forms!FTP!datainicial") _
= frm!DataInicial
qdf.Parameters("Forms!FTP!datafinal") _
= frm!DataFinal
qdf.Parameters ("[Informe a Unidade] text(15)")
Set rstReport = qdf.OpenRecordset()
intColumnCount = rstReport.Fields.Count
End Sub
Private Sub Report_Open(Cancel As Integer)
Dim intX As Integer
Dim qdf As QueryDef
Dim frm As Form
Set dbsReport = CurrentDb
Set frm = Forms!FTP
Set qdf = dbsReport.QueryDefs("TESTEP")
qdf.Parameters("Forms!FTP!datainicial") _
= frm!DataInicial
qdf.Parameters("Forms!FTP!datafinal") _
= frm!DataFinal
qdf.Parameters ("[Informe a Unidade] text(15)")
Set rstReport = qdf.OpenRecordset()
intColumnCount = rstReport.Fields.Count
End Sub