Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filtering by listbox

Status
Not open for further replies.
Jan 14, 2002
143
US
I've tried all sorts of ways to get this thing to filter, butnot having much luck. When I click on an item in a listbox, I want to filter for all corresponding [sub-po number] records and go to them in another tab.


This is essentially what I'm working with:

Me.[billing monthly].Form.RecordsetClone.Filter = "[sub-po number] = " & [sublist]
Me.[billing monthly].Form.RecordsetClone.FindFirst = "[sub-po number] = " & [sublist]
Me.[billing monthly].Form.Bookmark = Me.[billing monthly].Form.RecordsetClone.Bookmark
Me.tab1.SetFocus

What needs to be tweaked here?


 
I clipped the following from the Help on Filter Property -- Note To see the effects of filtering rstOrders, you must set its Filter property, and then open a second Recordset object based on rstOrders.

I think you will need to make a second recordset and use that as the recordsource of your form to see any effect.

I usually just write an SQL query with a "WHERE" clause, so I am not too familiar with using the Filter Property. I quote again: Note When you know the data you want to select, it's usually more efficient to create a Recordset with an SQL statement. Then they show how that is done.

Ron
 
Also, you might want to be sure and set the FilterOn property to TRUE.

I was messing around the other day with applying filters to forms and I seem to remember that the filter wouldn't work unless I explicitly set the FilterOn property to TRUE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top