B
Bill
I have a report whose RecordSource is a simple
query:
SELECT Volumes.VolID, Volumes.CatNo, Volumes.JCEdgeTitle,
Volumes.JCEdgeBackColor, Volumes.JCEdgeForeColor
FROM Volumes;
The query runs fine producing exactly what you see
listed in the query. The Open event sets the filter to
the desired VolID, as received in the reports OpenArgs.
The reports open event fails on the MsgBox statement
(inserted for debug) complaining that the "CatNo" field
cannot be found.
I thought perhaps I needed a Me.Requery after the
filter was set, but that method isn't valid. What am I
missing here?
Option Compare Database
Dim Arg() As String
Private Sub Report_Open(Cancel As Integer)
Arg = Split(OpenArgs, ";")
Me.Filter = "VolID = " & Arg(1)
Me.FilterOn = True
Me.CenterImage.Picture = Arg(0)
MsgBox Me.CatNo & "; " & Me.JCEdgeBackColor & "; " & Me.JCEdgeForeColor &
"; " & Me.JCEdgeTitle
End Sub
query:
SELECT Volumes.VolID, Volumes.CatNo, Volumes.JCEdgeTitle,
Volumes.JCEdgeBackColor, Volumes.JCEdgeForeColor
FROM Volumes;
The query runs fine producing exactly what you see
listed in the query. The Open event sets the filter to
the desired VolID, as received in the reports OpenArgs.
The reports open event fails on the MsgBox statement
(inserted for debug) complaining that the "CatNo" field
cannot be found.
I thought perhaps I needed a Me.Requery after the
filter was set, but that method isn't valid. What am I
missing here?
Option Compare Database
Dim Arg() As String
Private Sub Report_Open(Cancel As Integer)
Arg = Split(OpenArgs, ";")
Me.Filter = "VolID = " & Arg(1)
Me.FilterOn = True
Me.CenterImage.Picture = Arg(0)
MsgBox Me.CatNo & "; " & Me.JCEdgeBackColor & "; " & Me.JCEdgeForeColor &
"; " & Me.JCEdgeTitle
End Sub