need help with my filter code.

smoke

Registered User.
Local time
Today, 08:47
Joined
Sep 2, 2004
Messages
18
these are the 2 functions im calling to filter my form.. its a form with a subform inside of it and they both get filtered when the combo box is selected.

now the problem im having is frmWHSEgroup() is filtering fine, but with the invitem filter, if i have an item that is filtered, and i select an item that is not on the list it will still show 1 item of that type.. how do i fix it so it shows nothing how its suppose to be? because if the warehouse is empty it filters correctly and shows nothing. thanks in advanced.

Private Sub frminvitem_AfterUpdate()
WAREHOUSE_listview.Form.RecordSource = "SELECT * from master_inventory WHERE [tblinvpn] = frminvitem AND [tblinvgr_flag] = frmwhsegroup"
Me.Filter = "tblinvpn = Forms!warehouse.frminvitem and tblInvGR_FLAG = Forms!warehouse.frmWHSEGroup"
Me.FilterOn = True
' Me.Requery
End Sub

Private Sub frmWHSEGroup_AfterUpdate()
WAREHOUSE_listview.Form.RecordSource = "SELECT * from master_inventory where [tblinvgr_flag] = frmwhsegroup"
Me.Filter = "tblInvGR_FLAG = Forms!warehouse.frmWHSEGroup"
Me.FilterOn = True
Me.Requery
End Sub
 
can you post a db?


also you have noted the me.requery line why ?

Me.FilterOn = True
' Me.Requery
End Sub
 

Users who are viewing this thread

Back
Top Bottom