E
Ed Warren
Setup
Form1 --> unbound (just acts as a container for the other two forms)
Subform1a -> Bound to Query1
SubForm1b - Bound to Query2
Desired:
When the onCurrent Event fires in SubForm1a -->
set the filter on subForm1b to [ForeignKey] = [SubForm1a
Primary Key]
I have it almost working by using a button on Form1 to call a sub procedure
in SubForm1b to apply the filter.
SubForm1b
Public Sub setFilter(passedKey)
me.Filter = "[ForeignKey] = " & passedKey
me.FilterOn = true
End Sub
Form1.Button1 OnClick Event
Private Sub Button1_Click()
Forms![Form1]![Form1b].Form.SetFilter (PrimaryKey)
Me.TherapistList.Visible = True
End Sub
What I cannot make happen is a call from SubForm1a OnCurrent to the
Button1_Click() procedure.
The call from the onCurrent event in SubForm1a :
Forms("Form1").Form.Button1_Click
Generates an error ---
At this point I have a "GCE" -- General conceptual Error and cannot figure
out how to make them work well together.
Any help appreciated
Thanks
Ed Warren
Form1 --> unbound (just acts as a container for the other two forms)
Subform1a -> Bound to Query1
SubForm1b - Bound to Query2
Desired:
When the onCurrent Event fires in SubForm1a -->
set the filter on subForm1b to [ForeignKey] = [SubForm1a
Primary Key]
I have it almost working by using a button on Form1 to call a sub procedure
in SubForm1b to apply the filter.
SubForm1b
Public Sub setFilter(passedKey)
me.Filter = "[ForeignKey] = " & passedKey
me.FilterOn = true
End Sub
Form1.Button1 OnClick Event
Private Sub Button1_Click()
Forms![Form1]![Form1b].Form.SetFilter (PrimaryKey)
Me.TherapistList.Visible = True
End Sub
What I cannot make happen is a call from SubForm1a OnCurrent to the
Button1_Click() procedure.
The call from the onCurrent event in SubForm1a :
Forms("Form1").Form.Button1_Click
Generates an error ---
At this point I have a "GCE" -- General conceptual Error and cannot figure
out how to make them work well together.
Any help appreciated
Thanks
Ed Warren