A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

multiple comboboxes to filter specific record



 
 
Thread Tools Display Modes
  #1  
Old August 15th, 2004, 10:52 AM
leon
external usenet poster
 
Posts: n/a
Default multiple comboboxes to filter specific record

I have table called tbl_all_data in which a record is uniqely defined
by four columns being:

Date, Name, Account and Counterparty. What i need to build is a form
(which is bound to the earlier mentioned table) in which a user can
navigate to every specific record he wants by using comboboxes. This
means that there should be four comboboxes, to be able to get to every
single record. I now how to do this if there is only one combobox
needed but with 4 comboboxes this is a whole different ball game since
the number of available choices in every combobox should be limited by
the choice made in a previous combobox. Further more, I only want to
see every value once: for example there are only two possible names
-- therefore in the names combobox dopdown i only want to see each
name ones and not a 100 times if there a 100 records with the same
name.

Does anyone know how to do this, which code i have to enter in the
four comboxes?
  #2  
Old August 15th, 2004, 02:00 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Leon

FYI - Access treats the words "Date" and "Name" as reserved words, and may
produce results other than what you intended if you use these as column
names.

Are you saying that each of your records is a unique combination of the four
fields?

Take a look at "cascading combo boxes". The general idea is that you will
use four unbound combo boxes to narrow your search down.

In the first combo box, the underlying query returns all unique values of,
say, your "date" field. In the AfterUpdate event of this first combo box,
you will requery the second combo box and set the focus there.

The second combo box is based on a query that includes, as a criterion, the
value in the first. When you select a value in the first and requery, the
second combo box will list ONLY those rows with the value selected in the
first. Add an AfterUpdate procedure in the second to requery the third.

In the third combo box, base the underlying query on criteria from what was
selected in both first and second. Add an AfterUpdate procedure ...

In the fourth, ... (the same approach applies).

--
Good luck

Jeff Boyce
Access MVP

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare multiple fields in record Can Running & Setting Up Queries 1 May 29th, 2004 04:27 AM
Multiple ranks per record based on different fields. Looney Running & Setting Up Queries 4 May 28th, 2004 11:31 PM
Multiple Many-To-Many Tables Tom Database Design 7 May 15th, 2004 03:47 AM
Filter Out data based on multiple criteria Mark Graesser Worksheet Functions 1 December 1st, 2003 04:46 PM


All times are GMT +1. The time now is 12:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.