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

User Interface 1

Status
Not open for further replies.

mmaglio

Programmer
Jun 20, 2003
28
JP
I have a database with 3 basic sets of data (vendors, product types and manufacturers), all of which have many to many relationships with each other. The db is functional (I can get the information I want manually, with queries and filters), but i need to make it so anybody can use it intuitively.
I want a user to be able to pick a product type from a list, and as a result of their choice bring up a table of all the vendors who sell that product type and which vendors sell those manufacturers products.
Is there any simple way to take the choice from a list and make a query which is limited to only that product type?
I do have a query set up which will show all possible relationships(of product types, vendors who sell them, and manufacturers who make them and are represented by the vendor) all i really need to do is filter it based on the product type choice from the list.
This seems like it would be fairly common, if there is any way to do it without much coding it would help.

Thanks for the help,

Mark
 
Mark,

Make a form that has a list box with the product type values. When you place the list box, the list box wizard will help you set it up.
Now in your query, set the product type criteria to [forms]![yourlistboxformname]![yourlistboxname]
Place a command button on the form that opens your desired viewing form that has the record source property set to your query

Regards,

Shane
 
Ok, this almost works, what happens is when i open the query it prompts me asking for "Forms!frmProd!Product ", if i put in a product type value, it gives me the table i want (excellent), but this doesnt actually show the list box.
When I open the form, it doesnt do anything when i choose a product type.
What I would like to do is open the Form2, chose from the list and have that open the query. Or, if its easier, open the query and have a list pop up instead of the input box that it gives.

Thanks, I appreciate it
 
nope, good call... Thanx alot, I never wouldve thought to do that. Im all new at this.

Thanx,
Mark
 
Mark,

I suggest putting a control button on the list box form that opens a viewing form for the search results. You may already have one made for your db, so just copy and rename it and set the record source property to your query.

Now all a user has to do is select from the list box and click a go button that opens a form with the search results

Happy Designing,

Shane
 
well, this works, but unfortunately the form opens in columnar view with the command button instead of Datasheet view. Is there any way around this? If i try to create the results form as a datasheet it goes back to columnar, even if i set the Default View and ViewsAllowed to datasheet. Is there a way I can set the button to just open the query?

I tried changing the Click event procedure to open the query instead but it didnt work. Im not a very good programmer.

Also, if i leave my listbox unlocked I get a message about how it wont save the changes in data when i close the form, but if I lock it I cant click inside it at all, Ive gotta click those little arrows at the bottom. If it is unbound I dont get the message (because it doesnt change the values) but then my choice doesnt affect the output. d'oh.

man, Access just doesnt wanna let me do what I want.
 
Allright, I figured it all out!

Thanks to everybody for all the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top