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

Combo Box complications

I wasn't sure how to search for previous posts about this, it felt
real specific. Ok so here's the database & problem:

I have 4 combo boxes: cboServer, cboPolicy, cboDB, and
cboApplication. The idea behind the database is for a user to search/
select desired information in any kind of combination between the 4
combo boxes. Then the user clicks a button (btnSearch) and
subsequently a query ("Search Function") is run that shows all 4
different data selections from the 4 combo boxes.

Right now if a user selects something from EACH (all 4) combo box and
runs the search, it works fine (all 4 selections are displayed in
their respective columns).

Here's the issue: If the user selects information from only 3, 2, or
1 combo box(es) (not all 4), then the "search" returns nothing at
all. What it should return is a selection from all 4 combo boxes
(i.e. if a user selects a database from cboDB, clicking the search
button should return the Database previously selected as well as the
Server and Policy it resides on, and the Application that runs the
Database.) Depending on the combo box data that is selected by the
user, clicking the search button will find the rest of the data that
is related to the data that was selected by the user previous to
clicking search.

Maybe I'm just having a Friday brain fart, but any help on getting
this working right is much appreciated!! Thanks in advance,

Dave

Jun 29 '07 #1
4 2344
Assuming your form with the comboboxes is named FrmSearch, put the following
expression in the Server field of your query:
Forms!FrmSearch!cboServer Or (Forms!FrmSearch!cboServer Is Null)

Use a similar expression for the other three comboboxes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com


"Dave" <dj*******@gmail.comwrote in message
news:11*********************@c77g2000hse.googlegro ups.com...
>I wasn't sure how to search for previous posts about this, it felt
real specific. Ok so here's the database & problem:

I have 4 combo boxes: cboServer, cboPolicy, cboDB, and
cboApplication. The idea behind the database is for a user to search/
select desired information in any kind of combination between the 4
combo boxes. Then the user clicks a button (btnSearch) and
subsequently a query ("Search Function") is run that shows all 4
different data selections from the 4 combo boxes.

Right now if a user selects something from EACH (all 4) combo box and
runs the search, it works fine (all 4 selections are displayed in
their respective columns).

Here's the issue: If the user selects information from only 3, 2, or
1 combo box(es) (not all 4), then the "search" returns nothing at
all. What it should return is a selection from all 4 combo boxes
(i.e. if a user selects a database from cboDB, clicking the search
button should return the Database previously selected as well as the
Server and Policy it resides on, and the Application that runs the
Database.) Depending on the combo box data that is selected by the
user, clicking the search button will find the rest of the data that
is related to the data that was selected by the user previous to
clicking search.

Maybe I'm just having a Friday brain fart, but any help on getting
this working right is much appreciated!! Thanks in advance,

Dave

Jun 29 '07 #2
On Jun 29, 3:56 pm, Dave <djwest...@gmail.comwrote:
I wasn't sure how to search for previous posts about this, it felt
real specific. Ok so here's the database & problem:

I have 4 combo boxes: cboServer, cboPolicy, cboDB, and
cboApplication. The idea behind the database is for a user to search/
select desired information in any kind of combination between the 4
combo boxes. Then the user clicks a button (btnSearch) and
subsequently a query ("Search Function") is run that shows all 4
different data selections from the 4 combo boxes.

Right now if a user selects something from EACH (all 4) combo box and
runs the search, it works fine (all 4 selections are displayed in
their respective columns).

Here's the issue: If the user selects information from only 3, 2, or
1 combo box(es) (not all 4), then the "search" returns nothing at
all. What it should return is a selection from all 4 combo boxes
(i.e. if a user selects a database from cboDB, clicking the search
button should return the Database previously selected as well as the
Server and Policy it resides on, and the Application that runs the
Database.) Depending on the combo box data that is selected by the
user, clicking the search button will find the rest of the data that
is related to the data that was selected by the user previous to
clicking search.

Maybe I'm just having a Friday brain fart, but any help on getting
this working right is much appreciated!! Thanks in advance,
You could always force the user to choose something by checking the
value of each combobox from your search button, e.g.

If isnull(cbo1) or isnull(cbo2) or isnull(cbo3) or isnull(cbo4) then
MsgBox "You must choose a value in all drop down lists."
Exit Sub
End If

Bruce

Jun 29 '07 #3
Steve, thank you for your help! What you said to do works...however,
the expression for displaying all fields in the results doesn't fully
function.

If I choose 1 of the 4 combo boxes, it now works like a charm. It
brings up every specific instance that is tied to that one selected
combo box value. However, if I select, for example, an instance from
the Server and the Policy combo boxes, the results bring up ALL
instances of the server in ALL policies.

What it needs to do is if I choose two instances (one server in the
combo box and one policy that it resides on), it displays only that
one policy and only that one server (along with whatever databases and
applications are running on the selected server & policy).

So again, to reiterate/clarify, the problem is if I choose something
from both the Server and the Policy combo boxes and click search, it
brings up all Servers on the selected policy as well as all policies
that deal with the Selected server (many servers and many policies).
So instead I need it to give me the one server residing on the one
selected policy (along with DB and app info tied to the server
selected).

I don't think it is my normalization, but I guess it is possible.
Thanks again in advance...this forum is very helpful,

Dave

On Jun 29, 4:14 pm, "Steve" <s...@private.emailaddresswrote:
Assuming your form with the comboboxes is named FrmSearch, put the following
expression in the Server field of your query:
Forms!FrmSearch!cboServer Or (Forms!FrmSearch!cboServer Is Null)

Use a similar expression for the other three comboboxes.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com

"Dave" <djwest...@gmail.comwrote in message

news:11*********************@c77g2000hse.googlegro ups.com...
I wasn't sure how to search for previous posts about this, it felt
real specific. Ok so here's the database & problem:
I have 4 combo boxes: cboServer, cboPolicy, cboDB, and
cboApplication. The idea behind the database is for a user to search/
select desired information in any kind of combination between the 4
combo boxes. Then the user clicks a button (btnSearch) and
subsequently a query ("Search Function") is run that shows all 4
different data selections from the 4 combo boxes.
Right now if a user selects something from EACH (all 4) combo box and
runs the search, it works fine (all 4 selections are displayed in
their respective columns).
Here's the issue: If the user selects information from only 3, 2, or
1 combo box(es) (not all 4), then the "search" returns nothing at
all. What it should return is a selection from all 4 combo boxes
(i.e. if a user selects a database from cboDB, clicking the search
button should return the Database previously selected as well as the
Server and Policy it resides on, and the Application that runs the
Database.) Depending on the combo box data that is selected by the
user, clicking the search button will find the rest of the data that
is related to the data that was selected by the user previous to
clicking search.
Maybe I'm just having a Friday brain fart, but any help on getting
this working right is much appreciated!! Thanks in advance,
Dave- Hide quoted text -

- Show quoted text -
Jul 2 '07 #4
On Jul 2, 7:33 am, Dave <djwest...@gmail.comwrote:
Steve, thank you for your help! What you said to do works...however,
the expression for displaying all fields in the results doesn't fully
function.

If I choose 1 of the 4 combo boxes, it now works like a charm. It
brings up every specific instance that is tied to that one selected
combo box value. However, if I select, for example, an instance from
the Server and the Policy combo boxes, the results bring up ALL
instances of the server in ALL policies.

What it needs to do is if I choose two instances (one server in the
combo box and one policy that it resides on), it displays only that
one policy and only that one server (along with whatever databases and
applications are running on the selected server & policy).

So again, to reiterate/clarify, the problem is if I choose something
from both the Server and the Policy combo boxes and click search, it
brings up all Servers on the selected policy as well as all policies
that deal with the Selected server (many servers and many policies).
So instead I need it to give me the one server residing on the one
selected policy (along with DB and app info tied to the server
selected).

I don't think it is my normalization, but I guess it is possible.
Thanks again in advance...this forum is very helpful,

Dave

On Jun 29, 4:14 pm, "Steve" <s...@private.emailaddresswrote:
Assuming your form with the comboboxes is named FrmSearch, put the following
expression in the Server field of your query:
Forms!FrmSearch!cboServer Or (Forms!FrmSearch!cboServer Is Null)
Use a similar expression for the other three comboboxes.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com
"Dave" <djwest...@gmail.comwrote in message
news:11*********************@c77g2000hse.googlegro ups.com...
>I wasn't sure how to search for previous posts about this, it felt
real specific. Ok so here's the database & problem:
I have 4 combo boxes: cboServer, cboPolicy, cboDB, and
cboApplication. The idea behind the database is for a user to search/
select desired information in any kind of combination between the 4
combo boxes. Then the user clicks a button (btnSearch) and
subsequently a query ("Search Function") is run that shows all 4
different data selections from the 4 combo boxes.
Right now if a user selects something from EACH (all 4) combo box and
runs the search, it works fine (all 4 selections are displayed in
their respective columns).
Here's the issue: If the user selects information from only 3, 2, or
1 combo box(es) (not all 4), then the "search" returns nothing at
all. What it should return is a selection from all 4 combo boxes
(i.e. if a user selects a database from cboDB, clicking the search
button should return the Database previously selected as well as the
Server and Policy it resides on, and the Application that runs the
Database.) Depending on the combo box data that is selected by the
user, clicking the search button will find the rest of the data that
is related to the data that was selected by the user previous to
clicking search.
Maybe I'm just having a Friday brain fart, but any help on getting
this working right is much appreciated!! Thanks in advance,
Dave- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
Dave:

Roger Carlson has some excellent mdbs available for download on his
website that deals with exactly what you're looking for. Take a look
at the CreateQueries files for more guidance on how to build an
interface like what you're describing:
http://www.rogersaccesslibrary.com/T...ontents3.asp#C

HTH,
Jana

Jul 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
4
by: Heather | last post by:
Hi I am desparately looking for advice in relation to storing the results after selecting items from two combo boxes on a Referral form. The first combo box 'ctl Type' displays a full list of...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
7
by: Arnold | last post by:
Greetings Gurus, In a mainform's header, I have a combobox named comboStudents. The rowsource for this combobox is: SELECT -999 As StudentID, "<Add New Student>" As FullName, "aaa" As...
2
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to...
1
by: Bruce HS | last post by:
I'm using VS2005, VB, WinForms I’ve developed forms using those nice wizards Microsoft provides. However, I’m running into a couple of complications trying to work with the resulting Table...
4
by: robtyketto | last post by:
I have generated combo boxes based on contents of other combos and am newbie who slowly learning vba code. Heres an example of vba code use to update one combo box from another ...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.