Access 2003.
I have a form, and within this form is a subform named
"Subform_Search_1". When a record is highlighted on this subform and a button is clicked it supposed
to open another form (Incident_Form) with a filtered record.
The form did opened, but it did not filtered the selected
record.
Form Name: Incident_Form
Record Source: Table_Incident
Filter: [Incident_Number]=10-1-2002-3
///////////////////////////
Private Sub Open_Incident_Form_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Incident_Report"
stLinkCriteria = "[Incident_Number]=" &
Me![SubForm_Search_1].Form!Incident_Number
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
I have a form, and within this form is a subform named
"Subform_Search_1". When a record is highlighted on this subform and a button is clicked it supposed
to open another form (Incident_Form) with a filtered record.
The form did opened, but it did not filtered the selected
record.
Form Name: Incident_Form
Record Source: Table_Incident
Filter: [Incident_Number]=10-1-2002-3
///////////////////////////
Private Sub Open_Incident_Form_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Incident_Report"
stLinkCriteria = "[Incident_Number]=" &
Me![SubForm_Search_1].Form!Incident_Number
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub