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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Form?

Status
Not open for further replies.

jake7363

Technical User
May 31, 2006
56
Hi,
The field I want to filter is a text field, which accesses a lookup table of 47 records, each with up to 20 characters, many similar in spelling. In other words, the first six or 7 characters can be exactly the same.

I am asking if it is possible to create a popup form with a single combobox to use in order to select the text to use as criteria for the filter?

If so, how can this be accomplished?

Thanks in advance..
Jake
 
Create a query and base your form off of it.

Create a form with a combobox and, obviously, a label with instructions. Resize your form in design view - test it in form view. When it is the right size you want, set the following options on the form:

Scroll Bars = Neither
Navigation Buttons = No
Record Selectors = No
Dividing Lines = No
Border Style = Thin

The combobox's Row Source option should look something like:
SELECT DISTINCT [YourField] FROM [YourTable] where [YourField] Is not Null;

In the query, on the criteria line of whatever field you want to filter on, place:
[Forms]![Your Popup Form Name]![YourComboBoxName]

Then on the AfterUpdate event of the combobox, place:
Private Sub mmcid_AfterUpdate()
DoCmd.OpenForm "Your Form Name"
End Sub

NOTE: Your popup must stay open to do this. You can close it when the other form closes.
 
Thanks much! Works like a charm!

jake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top