Combo Box as Filter???

B

Bob Betts

I have a form with tblUSERS as main table connected to tblCABINET which is
connected to tblDRAWERS and lastly connected to tblFILES ...


Created two combo boxes one that looks up to tblCABINETS table and another
combo box that refers to tblDRAWERS ... both displays complete list of
cabinet and drawers regardless of who the user is displayed ...

What I want is that upon opening the form ... it would only display the
userno and user name ..... with the combobox for drawers lshowing anly
drawers for that current user and after clicking the combox ... the combobox
for drawer would be filtered based from the cabintes cbo box ... which then
displays certain files based from the drawers filtered ...


Thanks.
 
G

Guest

If this is not the most asked and answered question in this news group, it is
surely # 2.
What you are wanting is commonly called "Cascading Combos"
Without going into details (you can do some searching on this site and find
many), the concept is to use queries for your combo rowsources that can be
filtered based on the content of the previous combo. Combo 3 filters based
on the value in Comb 2, Combo 2 filters based on the content in Combo 1.
When you make a selection in 1, requery 2 and 3. When you select from 2,
requery 3.

That's all there is to it.
 
B

Beatrix J B

Thanks klatuu ... this may sound silly but what i am asking for also is if i
have a combobox... i want the contents of the first combobox be filtered
based from the current user... .. umm not good at explaining technically ..

I am currently doing a user .. cabinet .. drawer ... files project.

Thinking of making a form wherein it would be based from users tblUSERS
connected to other table using USERNO .... what i want is when i open the
form ... the 1st combo box (based on cabinets) would only display cabinets
owned by current user .... I can filter the 2nd and 3rd combo box but i
don't know how to filter the 1st combo box.

Appreciate more help.
 
G

Guest

It would be the same. You just need to use a query as the row source for the
combo filtered on the user name. The question is, where are you carrying the
user name?
 
B

Beatrix J B

I plan to make a log on form which opens upon opening application put some
input box for user log on with password and user nomber and a combobox that
looks up to department tbl.

Based from the input in the log on screen ..... this would serve as a basis
for the filter.

Just would have to research how to make a log on screen and pass the values
placed in it ... just starting to program. :)
 
R

Rick Brandt

Beatrix J B said:
I plan to make a log on form which opens upon opening application put some
input box for user log on with password and user nomber and a combobox that
looks up to department tbl.

Based from the input in the log on screen ..... this would serve as a basis
for the filter.

Just would have to research how to make a log on screen and pass the values
placed in it ... just starting to program. :)

I'll just give you the standard warning then that any "home-grown" security like
this is a phenomenal waste of time if any if your users has even a marginal
familiarity with how Access works. A seasoned Access user would be able to
circumvent a logon system like this in a few seconds. If you are just trying to
"guide clerks" it might serve your purposes, but don't go this route if you need
something that provides a real barrier.

Access comes with built in security that while still breakable at least requires
that the "breaker" be willing to spend some money on utility software to do so.
If you need something more "industrial strength" then your data should really be
on a server-based system like SQL Server which has proper security.
 
G

Guest

If you need a value like this to be available to the entire application, you
could use a Global variable; however, as Rick points out, home grow security
doesn't really work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top