Use a button to filter a sub subform

D

DawnTreader

hello all

i have a unbound mainform with a subform showing the orders in datasheet
view and that order sub form has with a order line items sub form in
datasheet view.

i want to be able to filter the line items based on the push of a button on
the unbound main form. so basically i want to cause a filter to be enabled on
the sub sub form.

is there a way to do this?
 
D

DawnTreader

Hello All

i have tried to develope a bit of code to get this going, but i have
recieved an error 438, object doesnt support this method.

here is the code:

Private Sub tglShowHideShippedLines_Click()
Dim txtFilter As String

txtFilter = "QTYLTS > 0"

If Me.tglShowHideShippedLines = True Then
Me.tglShowHideShippedLines.Caption = "Hide Shipped Lines"
Else
Me.tglShowHideShippedLines.Caption = "Show Shipped Lines"
End If

Me.Form!sfrmOpenOrderTracker.Form!sfrmqryWOtoCOLineItems.Filter =
txtFilter
Me.Form!sfrmOpenOrderTracker.Form!sfrmqryWOtoCOLineItems.FilterOn =
tglShowHideShippedLines
End Sub

i get the error on the

Me.Form!sfrmOpenOrderTracker.Form!sfrmqryWOtoCOLineItems.Filter = txtFilter

line.

any and all help appreciated.
 
D

DawnTreader

Hello All

forget i ever asked. i found a solution that i used in another form with a
similar situation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top