R
rupertsland
Hello.
I am building a report tracking database using Access 2003.
I have a main form that's tied to an underlying Projects table. On the main
form I have a subform that is tied to an underlying Reports table. Each
report record has a foreign key [PROJ_ID] that allows me to associate a
report with a project from the Projects table.
I used a wizard to create a combo box on the main form to allow me to select
a project and display a list reports for that project in the subform.
What I want to do is provide a way to display all records in the subform. Is
there a way to do this?
The following VisualBasic code (below) was generated by the wizard, but I do
not know what code to use to show all records. Or would it be easier to
create a command button on the main form that would overide the combo box and
show all records in the subform?
-----
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
-----
Any help would welcome. Please note that I am not proficient in VisualBasic.
Dirk
Winnipeg, Canada
I am building a report tracking database using Access 2003.
I have a main form that's tied to an underlying Projects table. On the main
form I have a subform that is tied to an underlying Reports table. Each
report record has a foreign key [PROJ_ID] that allows me to associate a
report with a project from the Projects table.
I used a wizard to create a combo box on the main form to allow me to select
a project and display a list reports for that project in the subform.
What I want to do is provide a way to display all records in the subform. Is
there a way to do this?
The following VisualBasic code (below) was generated by the wizard, but I do
not know what code to use to show all records. Or would it be easier to
create a command button on the main form that would overide the combo box and
show all records in the subform?
-----
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
-----
Any help would welcome. Please note that I am not proficient in VisualBasic.
Dirk
Winnipeg, Canada