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

need help with filter in form by pulldown

Status
Not open for further replies.

frodeb

Programmer
Jan 9, 2004
10
NO
i have a query named members and a form with subform call form1. In the form i have a pulldown box (named text12 and has the number 1 to 10) and in the subform i have the fild from the members query, but when i choose 1 (so that only grupp from memers 1 is displayed (rest is filer out) nothing happend, but when i close the form and reopen it then i get all the member from grupp 1 else i get all the member from all the gupps. Anyone have an ide how to fix this.

(query) members
(filds) id, name, grupp
criteria [forms]![form1]![text12]
 
Try adding a Me.Refresh to the After Update property of the drop down.

Also, make sure you have the proper filter criteria in the row source of the drop down.

Kind of like this:

Select members from yourtablename where group = Forms!NameofyourForm!nameofgroupdropdown.value

I am assuming members and group are the fieldnames in the table.
 
sorry, after i submitted i saw your definitions at the bottom.

the rowsource would look like this:

select name from members where grupp = [forms]![form1]![text12].value

be sure to use the table name in the select and not the query name.
i am asuming members is also the name of the main table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top