473,394 Members | 1,802 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,394 software developers and data experts.

How to use a dropdown value an use that data in a query?

I have a database of people and items associated with them. I am working on a form that has as listbox of all the names of the poeple, select the person you want and then click the button and it should run the query with the selected value from the listbox into the query? At the moment when i hit the button my query runs and returns all the people.... how do i get the selected value to be passed into the query?

Thanks

Ethan

**Email removed in accordance with site rules**
Jul 3 '07 #1
5 4712
Rabbit
12,516 Expert Mod 8TB
In the query use Forms![Name of Form]![Name of Combobox]
Jul 3 '07 #2
In the query use Forms![Name of Form]![Name of Combobox]

I am not getting that to work. I am using a dropdown list box. Will that make it different? is there a way to index what is selected in the listbox?

Ethan
Jul 3 '07 #3
Rabbit
12,516 Expert Mod 8TB
I am not getting that to work. I am using a dropdown list box. Will that make it different? is there a way to index what is selected in the listbox?

Ethan
What is the SQL of the query?
Jul 3 '07 #4
What is the SQL of the query?

SELECT Writers.Writers, Writers.[Writers ID], Writers.[Writer Information], Apperance.[Apperance ID], Apperance.Description, Apperance.Date
FROM Writers INNER JOIN Apperance ON Writers.[Writers ID] = Apperance.[Writers ID]
WHERE (((Writers.Writers) Like [Forms]![FindWriter]![List6]));

I appreciate you taking the time to help

Ethan Cook
Jul 5 '07 #5
Rabbit
12,516 Expert Mod 8TB
SELECT Writers.Writers, Writers.[Writers ID], Writers.[Writer Information], Apperance.[Apperance ID], Apperance.Description, Apperance.Date
FROM Writers INNER JOIN Apperance ON Writers.[Writers ID] = Apperance.[Writers ID]
WHERE (((Writers.Writers) Like [Forms]![FindWriter]![List6]));

I appreciate you taking the time to help

Ethan Cook
Are you using Like because you're doing a substring search? If so then it should be
Expand|Select|Wrap|Line Numbers
  1. Like "*" & [Forms]![FindWriter]![List6] & "*"
Is the listbox bound on the correct field?

The problem might be because the table name and the field name is the same but I doubt that's the problem.
Jul 5 '07 #6

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

Similar topics

3
by: Cagey | last post by:
What I'm trying for: If this selection or if click on selection (highlighted line choice/ which ever selection change) w/in query's combo dropdown list box (on Switchboard), then Open in...
11
by: eureka | last post by:
Hi All, I'm training in Servlets, JSP and JavaScript, I have a web page in which there's a "StudentName" textbox and below it is a "Names" Dropdown list. Initially the Textbox is empty and...
3
by: Ninio | last post by:
I have a simple form with a dropdown menu that consists of 3 option and each option should retrieve a query from a database. i have been looking all over the place and can't seem to find how to do...
13
by: Shutey | last post by:
I have a strange issue with dropdowns. Using php4, mySQL5, Apache 2 on a fast XP pro PC, I have a form which requires 5 dropdowns populated with indentical values. I extract the values using SQL...
4
by: Panna | last post by:
Hey there I am using phpMyAdmin and MySQL to develop a dbase application. I have a dropdown menu on one of the pages which gets populated automatically with data from a table in the database....
8
by: Wingot | last post by:
Hey, I have a program I am trying to write using Visual C#, SQL Server 2005/2008, and Visual Studio 2008, and one part of it includes a Schema called Client. Inside this schema, three tables...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
2
coolv
by: coolv | last post by:
Hello I have problem in my page that the dropdown box is not displaying data according to selection of first dropdown.Please help me. Below is my code. thanks.............. <?php ...
7
by: microsoftboy | last post by:
Hi, Using the following selection criteria, I am able to list the data from mysql db, but I would like to provide the following options for users: Select All Data, Select None. I am not sure if...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.