View Full Version : Drop Down Box SQL Query Details


Randomblink
10-04-2001, 08:43 AM
Ok...
Let me start with saying this is the start of my attempts to learn SQL...so please be gentle...

I have a form...
It pulls data from ONE table...

The table...
Has records that contain location data on various locations throughout the city I live...parks, city hall, 911 buildings, etc...

Right now, the table has a combobox that you drop down and search for a specific location...

I am creating UNBOUND text fields that I would like the Combo Box to use as criteria...

The fields I would like to set these unbounds as criteria for are:

Facility Name
Address
Details
Comments
Panel Number
County
Parcel Number
and a few more...

What I plan on doing right now is...

Creating an unbound for EACH field at the bottom of my form...
A user will enter a string of data in the field of his choice...

for instance...I am looking for all locations on Panel Number 32...that have the word Water in the description...

So I would go to the unbounds...enter WATER in the unbound field for location descriptions...and enter 32 in the unbound field for location Panel Numbers...

The the SQL would run, and criteria for it would be 32 in the Panel Number field...and WATER in the description field...

phew!

So, is this enough information that someone could baby-step me through this...?

Danka Shane to all who can help...
Enjoy the ride to those who can't...lol

Randomblink
10-05-2001, 08:52 AM
Does no one have an answer...?
Or was I too confusing...?
Help...

LQ
10-05-2001, 09:46 AM
I am a little confused...is your objective to create a custom search form rather than a parameter query?

Randomblink
10-05-2001, 10:13 AM
Custom Search Form...yes...

THe combo box already pulls ALL locations in the database into the drop down through a SQL statement that the Wizard built...

What I want it to do, is ONLY drop down locations that match up with the criteria entered into the unbound text boxes at the bottom of my form...

So if I am wanting to research on locations that have the word(s) City or "City Hall" I can type City or "City Hall" in the [Facilities Name] unbound box at the bottom of my form and then click on the drop down and the only locations that the SQL query will grab and display for my selection are those that have the contents of my [Facilities Name] field at the bottom of my form...

Makes sense now...?

Im sorry I am so confusing, I am just a rank beginner in so many ways it makes me sick...

(specially since I have taken Access Beginner through Advanced and learned nothing new...so it looks like I need a VB class now...

LQ
10-05-2001, 10:25 AM
Hey, I'm a rank beginner, too, so I can totally empathize. But I figure I learn a little bit every day, so hopefully one day I won't be so ignorant!!

I don't know if this will help, but a couple of months ago someone helped me design a custom search form where an SQL statement is built based on unbound textboxes. That sounds something like what you are trying to do. Here's the link: http://www.access-programmers.co.uk/ubb/Forum4/HTML/004007.html

HTH!!
LQ

Jack Cowley
10-05-2001, 12:32 PM
This article is about synchronizing combo boxes but it is relevent to what you want to do. I might suggest that you have two combo boxes so the user can only select legitimate selections for the filter for the second combo box.

http://support.microsoft.com/support/kb/articles/Q209/5/76.ASP?LN=EN-US&SD=gn&FR=0&qry=q209576&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000