D
deb
Access 2003
I am trying to change the record source of my report using the below code.
I get error 2191. What is the correct way to set the record source of a
report?
If UnitNo = 0 Then
Dim strsql3 As String
Dim strsql4 As String
strsql3 = "SELECT t040Project.ProjectID,
t041ProjectDetails.ProjectDetailsID, " & _
" FROM t040Project INNER JOIN (t041ProjectDetails INNER JOIN t000Facts
" & _
" ON t041ProjectDetails.UnitID = t000Facts.UnitID) " & _
" ON t040Project.ProjectID = t041ProjectDetails.ProjectID " & _
" WHERE (((t040Project.ProjectID)=[Reports]![rClosure]![ProjectID])) " & _
" ORDER BY t000GFacts.Unit;"
Me.rClosureFuel.Report.RecordSource = strsql3
Me.rClosureFuel.Report.Requery
I am trying to change the record source of my report using the below code.
I get error 2191. What is the correct way to set the record source of a
report?
If UnitNo = 0 Then
Dim strsql3 As String
Dim strsql4 As String
strsql3 = "SELECT t040Project.ProjectID,
t041ProjectDetails.ProjectDetailsID, " & _
" FROM t040Project INNER JOIN (t041ProjectDetails INNER JOIN t000Facts
" & _
" ON t041ProjectDetails.UnitID = t000Facts.UnitID) " & _
" ON t040Project.ProjectID = t041ProjectDetails.ProjectID " & _
" WHERE (((t040Project.ProjectID)=[Reports]![rClosure]![ProjectID])) " & _
" ORDER BY t000GFacts.Unit;"
Me.rClosureFuel.Report.RecordSource = strsql3
Me.rClosureFuel.Report.Requery