G
Guest
Imagine if you will....
I have three forms combined together to create a common workspace.
I have a parent form "frm_BaseForm"
On this form I have two subforms "frm_LeftForm" and,
"frm_RightForm" both using the the same table as its record source.
The frm_LeftForm has a summary listing of all records in the table, the
frm_RightForm provides detailed information on a single record from the same
table. The idea is to keep frm_RightForm in synch with the selected record in
frm_LeftForm. The fields on each form that are to synch are both called "ID"
My strategy was to leverage the "Enter" event of the frm_LeftForm record to
cause a filter, and possibly requery, of frm_RightForm - filtering by the
shared "ID."
The following is basically what I was trying, but I don't seem to be
referencing frm_RightForm correctly as I get a VBA error saying it can't find
the form....
Private Sub ID_Enter()
Dim strFilter As String
MsgBox strFilter <----Just to show I am acquiring the correct ID
strFilter = "ID = " & ID
Forms!frm_RightForm.Filter = strFilter
End Sub
Any ideas?
I have three forms combined together to create a common workspace.
I have a parent form "frm_BaseForm"
On this form I have two subforms "frm_LeftForm" and,
"frm_RightForm" both using the the same table as its record source.
The frm_LeftForm has a summary listing of all records in the table, the
frm_RightForm provides detailed information on a single record from the same
table. The idea is to keep frm_RightForm in synch with the selected record in
frm_LeftForm. The fields on each form that are to synch are both called "ID"
My strategy was to leverage the "Enter" event of the frm_LeftForm record to
cause a filter, and possibly requery, of frm_RightForm - filtering by the
shared "ID."
The following is basically what I was trying, but I don't seem to be
referencing frm_RightForm correctly as I get a VBA error saying it can't find
the form....
Private Sub ID_Enter()
Dim strFilter As String
MsgBox strFilter <----Just to show I am acquiring the correct ID
strFilter = "ID = " & ID
Forms!frm_RightForm.Filter = strFilter
End Sub
Any ideas?