J
johnlute
I have a form with a combobox that filters it:
SELECT tblProfiles.*, tblProfiles.Type AS PKType
FROM tblProfiles INNER JOIN tblProfilesClasses ON
tblProfiles.txtProfileID = tblProfilesClasses.txtProfileID
WHERE (((tblProfiles.Type)=[Forms]![frmPackaging].[Form]!
[cbqryTypes])) OR ((([Forms]![frmPackaging].[Form]![cbqryTypes]) Is
Null));
[cbqryTypes] has an AfterUpdate event that filters the form:
Private Sub cbqrytypes_AfterUpdate()
Me.Filter = ""
Me.cbProfileID.Requery
Forms![frmPackaging].Form.Refresh
Forms![frmPackaging].Form.Requery
End Sub
There's also a "clear" button that clears [cbqryTypes] resulting in
all records being displayed:
Private Sub cmdclrcbqrytypes_Click()
Me.Filter = ""
Me.cbqrytypes = Null
Me.cbProfileID.Requery
Forms![frmPackaging].Form.Refresh
Forms![frmPackaging].Form.Requery
End Sub
These work fine EXCEPT when the form is opened via a double click
event from another form which results in it being filtered by
[txtProfileID] which happens to be the primary key of the record set.
This filter "interferes" with the above AfterUpdate event of
[cbqrytypes] rendering it useless.
I'm exhausted. I've tried LOTS of different ways to clear the
[txtProfileID] filter and just can't get it.
How can I clear the filter so that the AfterUpdate event will work?
Thanks!!!
SELECT tblProfiles.*, tblProfiles.Type AS PKType
FROM tblProfiles INNER JOIN tblProfilesClasses ON
tblProfiles.txtProfileID = tblProfilesClasses.txtProfileID
WHERE (((tblProfiles.Type)=[Forms]![frmPackaging].[Form]!
[cbqryTypes])) OR ((([Forms]![frmPackaging].[Form]![cbqryTypes]) Is
Null));
[cbqryTypes] has an AfterUpdate event that filters the form:
Private Sub cbqrytypes_AfterUpdate()
Me.Filter = ""
Me.cbProfileID.Requery
Forms![frmPackaging].Form.Refresh
Forms![frmPackaging].Form.Requery
End Sub
There's also a "clear" button that clears [cbqryTypes] resulting in
all records being displayed:
Private Sub cmdclrcbqrytypes_Click()
Me.Filter = ""
Me.cbqrytypes = Null
Me.cbProfileID.Requery
Forms![frmPackaging].Form.Refresh
Forms![frmPackaging].Form.Requery
End Sub
These work fine EXCEPT when the form is opened via a double click
event from another form which results in it being filtered by
[txtProfileID] which happens to be the primary key of the record set.
This filter "interferes" with the above AfterUpdate event of
[cbqrytypes] rendering it useless.
I'm exhausted. I've tried LOTS of different ways to clear the
[txtProfileID] filter and just can't get it.
How can I clear the filter so that the AfterUpdate event will work?
Thanks!!!