R
rupertsland
Greetings.
I am building a report tracking database using Access 2003.
I have a main form that's tied to an underlying query that displays a list
of Projects. On the main form I have a subform that displays a list of
published reports (the subform is tied to an underlying query that displays a
list of reports - each report record has a foreign key [PROJ_ID] that allows
me to associate a report with a project). I added a combo box using the combo
box wizard to allow me to filter out reports associated with a project and
display the filtered result in the subform.
What I would like to do is to provide an option to clear the filter and
display all records in the subform. The combo box is only able to display a
list of projects, but I am unable to find a way to provide a "Show all
records" option in the combo box.
Is there a way to do this? The VB code I'm using was generated by the
wizard, and is as follows:
-----
Private Sub Combo62_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PROJ_ID] = " & Str(Nz(Me![Combo62]))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
-----
If the above code can not be changed, is there an alternative workaround?
Any help would welcome.
Dirk Schmid
Winnipeg, Canada
I am building a report tracking database using Access 2003.
I have a main form that's tied to an underlying query that displays a list
of Projects. On the main form I have a subform that displays a list of
published reports (the subform is tied to an underlying query that displays a
list of reports - each report record has a foreign key [PROJ_ID] that allows
me to associate a report with a project). I added a combo box using the combo
box wizard to allow me to filter out reports associated with a project and
display the filtered result in the subform.
What I would like to do is to provide an option to clear the filter and
display all records in the subform. The combo box is only able to display a
list of projects, but I am unable to find a way to provide a "Show all
records" option in the combo box.
Is there a way to do this? The VB code I'm using was generated by the
wizard, and is as follows:
-----
Private Sub Combo62_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PROJ_ID] = " & Str(Nz(Me![Combo62]))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
-----
If the above code can not be changed, is there an alternative workaround?
Any help would welcome.
Dirk Schmid
Winnipeg, Canada