S
S Himmelrich
I've reviewed google groups for solution, most of the post are
directing to broken links.....here is my attempt at the code, which is
erroring out with 'can't find field "|" referred to in your
expression'.
HERE IS THE CODE (which I found online):
Private Sub Command463_Click()
On Error GoTo Err_Command463_Click
Dim PIDNumber As String
Dim Sql As String
Dim rs As Recordset
Sql = "SELECT * FROM " & [One Pager Status Reports] & " ORDER BY PID"
Set rs = CurrentDb.OpenRecordset(Sql)
With rs
..MoveLast
..MoveFirst
Do Until .EOF = True
PIDNumber = !PID
DoCmd.OutputTo acReport, "Portfolio Project Status Report"
..MoveNext
Loop
End With
rs.Close
'--------Report Open Event (Report1)--------------
Me.caption = PIDNumber
Me.RecordSource = "SELECT * FROM " & [One Pager Status Reports] & "
WHERE PID = '" & PIDNumber & "'"
Exit_Command463_Click:
Exit Sub
Err_Command463_Click:
MsgBox Err.Description
Resume Exit_Command463_Click
End Sub
directing to broken links.....here is my attempt at the code, which is
erroring out with 'can't find field "|" referred to in your
expression'.
HERE IS THE CODE (which I found online):
Private Sub Command463_Click()
On Error GoTo Err_Command463_Click
Dim PIDNumber As String
Dim Sql As String
Dim rs As Recordset
Sql = "SELECT * FROM " & [One Pager Status Reports] & " ORDER BY PID"
Set rs = CurrentDb.OpenRecordset(Sql)
With rs
..MoveLast
..MoveFirst
Do Until .EOF = True
PIDNumber = !PID
DoCmd.OutputTo acReport, "Portfolio Project Status Report"
..MoveNext
Loop
End With
rs.Close
'--------Report Open Event (Report1)--------------
Me.caption = PIDNumber
Me.RecordSource = "SELECT * FROM " & [One Pager Status Reports] & "
WHERE PID = '" & PIDNumber & "'"
Exit_Command463_Click:
Exit Sub
Err_Command463_Click:
MsgBox Err.Description
Resume Exit_Command463_Click
End Sub