Re: 3 linked combo boxes in a form Options



Opal <tmwelton@xxxxxxxxxx> wrote in
news:1187486777.135919.20100@xxxxxxxxxxxxxxxxxxxxxxxxxxx:

Thank you for your response. Unfortunately, the option you
suggested did not produce the desired result. Perhaps if I
explain further what
I am trying to do, you can offer some alternatives.

Shopcbo based on Shopqry based on Shoptbl. Columns in the
table are ShopName and ShopID. The shop same is self
explanatory. The shop ID
is a field a created to match up with a field in the equipment
table.


Areacbo based on Areaqry based on Areatbl. Columns in the
table are AreaName, AreaLink and ShopName. The area link is a
field created to identify each area that a piece of equipment
belongs to and has a corresponding field in the equipment
table.


I have revised the form with VB code, as opposed to a macro,
to run the requery so that whenever the Shopcbo is changed,
the Areacbo "updates" with the area selections available to
that specific shop.


Now the Equipmenttbl has 4 columns: EquipmentName,
EquipmentNumber, AreaLink, ShopID. The Equipment table was
created from a make table query because I linked 3 separate
equipment tables from outher databases to this database I am
working in. Three shops maintain separate databases with
equipment listed for other purposes. Since I did not want
have to update a table in this database everytime a piece
of equipment was added, or changed or deleted, I chose to link
them to
this database. I performed a union query to bring them all
together into one Equipmenttbl. As a result of the
Equipmenttble data coming from separate databases, the
AreaLink number is not unique. For example: Two shops have
several areas in their shop named the same and since they work
out of two different databases, the AreaLink number is also
the same. That is why I added the ShopID indicated to
differentiate between the two shops. So, even though the
areas may be
named and numbered the same, the equipment in these areas is
completely different. Follow me so far?


Shop Name Shop ID Area Name Area ID
EquipmentName EquipmentNumber
North A Subs
3 Robot ABC -1234
South B Subs
3 Snake Robot XYZ - 4576


I need to be able to have a combo box for the Equipment that
will only bring up a specific list of equipment for each shop
and area. There are over 900 pieces of equipment in the
table, and I cannot bring up all those in the combo box.
However, there would only be 10 at most per area.


I though perhaps a parameter query from the Equipment table
that looks for the specific ShopID and AreaID based on the
results from the Shopcbo and Areacbo selections....A SELECT
.... WHERE statement perhaps..... But I am just unclear as
how to accomplish this.

If the bound colums in the combo boxes are the ID numbers.
this statement in the record source of the cboEquipment should
work.

SELECT EquipmentNumber, EquipmentName
FROM EquipmentTBL
WHERE [SHOP ID] = Forms![yourform]!cboShop
AND [arealink] = Forms!yourform!cboArea

If you have bound the comboboxes to the name instead, you could
try to set some hidden textboxes with the IDs in the afterUpdate
event of the respective control, and use those in the where
clause.

Your assistance would be appreciated. Thank you.

HTH

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: 3 linked combo boxes in a form Options
    ... The shop same is self ... is a field a created to match up with a field in the equipment ... to run the requery so that whenever the Shopcbo is changed, ... equipment tables from outher databases to this database I am ...
    (microsoft.public.access.formscoding)
  • 3 linked combo boxes in a form Options
    ... The shop same is self explanatory. ... is a field a created to match up with a field in the equipment ... AreaName, AreaLink and ShopName. ... separate databases with equipment listed for other purposes. ...
    (microsoft.public.access.formscoding)
  • Re: 3 linked combo boxes in a form Options
    ... The shop same is self ... is a field a created to match up with a field in the equipment ... EquipmentNumber, AreaLink, ShopID. ... equipment tables from outher databases to this database I am ...
    (microsoft.public.access.formscoding)
  • Re: 3 linked combo boxes in a form Options
    ... The shop same is self ... is a field a created to match up with a field in the equipment ... EquipmentNumber, AreaLink, ShopID. ... equipment tables from outher databases to this database I am ...
    (microsoft.public.access.formscoding)
  • Re: New to it all
    ... looking around online at dive equipment and various packages that are ... Around here, open water certification costs about $300 per student, and dry suit certification is another $150, which includes suit rental. ... What seems to fit you in the shop won't always work in the water. ...
    (rec.scuba)