473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

filter or query based on user input

Hello...

I'm REALLY new to this whole thing, so if you all don't mind speaking in lamens terms for me... What I want to do seems like it should be simple, but I've been searching everywhere and I can't come up with anything. Here's the deal.

I have 4 categories in a table, one of which is "products" where there are multiple entries, I want to create a search which will find one specific product based on a users input. Say for example:

Company A offers keychains, lanyards and hats.
Company B offers shirts and hats
Company C offers only keychains.

I'd like to create a textbox in a seperate form where I can type in "keychains", click search and it will return all the information pertaining to Companies A and C. or if i were to input "hats", get info on Compaines A and B.

Do I use a filter, a Query... I really don't know how to do it... It seems like it could be so simple, but apparenlty everything has to be incredibly difficult with Access... I don't see why I can't type in something comparing the value of Text9 to the text contained in the Products Column in the criteria box of a filter or query... apparently this requires some kind of code... where do I put the code anyway? Any light that could be shed would be so incredibly appreciated. If anyone has different approach, I'm open to ideas as well.

Thanks,
Ed
Jul 13 '06 #1

✓ answered by comteck

You are on the right track with creating a query. If I understand you correctly, the data that is in the product field of the table are lanyards, shirts, hats, etc. If this is correct, then what you have to do is create a query for the table that has the product field (for ex. the name of the query could be qryProduct). When you create a new query, the list of tables will appear. Just double click on the table, and it will appear in the upper portion of the query.

Drag down into the query all the fields you want to appear on your form. Then, on the bottom, you will see a box called "Criteria". Under "Product", in the Criteria box, type the following:

[Enter Product]

Close and save the query. Then, on the form itself, open the properties and in the Record Source, assign the query (in this case "qryProduct") to the form. To open the properties, go into design view, and right click on the little black square in the upper left corner.

2 19439
comteck
179 100+
You are on the right track with creating a query. If I understand you correctly, the data that is in the product field of the table are lanyards, shirts, hats, etc. If this is correct, then what you have to do is create a query for the table that has the product field (for ex. the name of the query could be qryProduct). When you create a new query, the list of tables will appear. Just double click on the table, and it will appear in the upper portion of the query.

Drag down into the query all the fields you want to appear on your form. Then, on the bottom, you will see a box called "Criteria". Under "Product", in the Criteria box, type the following:

[Enter Product]

Close and save the query. Then, on the form itself, open the properties and in the Record Source, assign the query (in this case "qryProduct") to the form. To open the properties, go into design view, and right click on the little black square in the upper left corner.
Jul 13 '06 #2
Hello,

Sorry for bumping such an old thread but I'm trying to produce a query almost identical to the above solution. Using the above question and solution as an example what I want to be able to do is replace the text input box that pops up with a combo box holding all of the items in the 'Products' part of the table to allow the user to pick any of the products in the table, eliminating the possibility of entering an item does not exist resulting in the query returning an empty datasheet.

Many thanks in advance for any help reagrding this matter.
Oct 11 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
2
by: Terry | last post by:
I have cerated a Form, ExamsFrm, which is used to input details of exams taken at several Centres. It dosplays details from StudentTbl and has a SubForm which displays details from ExamsTble. I...
2
by: andrew007 | last post by:
I have a question about dataset rowfilter. I have a list of event table in a database. each event has start-date and end-date column. I grab these from db and save to dataset. And then I have to...
11
by: Bob | last post by:
I am in the process of upgrading an Access database to SQL Server (and climbing that learning curve!). The wizard happily upgraded all the tables and I can link to them OK using ODBC. The...
0
by: Chuck36963 | last post by:
Hi all, I've been working on a listing problem and I can't figure out how to work it out. I have looked far and wide on the web to find answers, but I'd like other peoples input on my project in...
0
by: Josetta | last post by:
This is for informational purposes...I had a problem and I thought it might help others in a similar situation. I hope someone, someday, finds this idea useful. I've garnered so much knowledge...
1
by: Barb.Richards | last post by:
I have created an append query that pulls information from one database, and will append the selected information into a new table. The fields are setup like 'number' 'category' 'code' 'shares' and...
1
by: Bface | last post by:
Hi All, I am stuck on a problem and hope someone can help me out. I have 8 users who will be using a form . For the users to access their accounts I use the SendKeys function, the user click on...
1
by: jcf378 | last post by:
Hi all-- Does anyone have any insight as to how I might create a search form that allows a user to select criteria based on any related table in the whole database. The search form I have now only...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.