LookUp columns!

G

Guest

Hi,
I have database with a couple of tables. The main table contain foreign keys
from the other tables. I have made look-up columns for them. I want to select
a value from first look-up column and then in the others Look-up columns to
left only the values matching with the selected value from the first column.
For example:
LookUp Column: Manufacturer LookUp Column: Type

IBM x336
HP x346
SUN p595
rp8420
v880
These are two of the LookUp columns in the main table. When I choose IBM in
column type it should be left only x336, x346, p595 which match to IBM.
Thank you in advanced.
 
J

Jeff L

In order for this to work the way you want it to, you need to have the
ManufacturerID in the Type table. Then when you chose the
Manufacturer, you will need to requery the Type to show the correct
values. Use the After Update event for Manufacturer. The row source
for the type should be
"Select TypeID, Type From tblType Where ManufacturerID = " &
Forms!YourFormName!ManufacturerComboBoxName & ";"

Make sure you use the correct field names in the row source that I gave
you.

Hope that helps!
 
G

Guest

Hi, thanks for your reply.
I don't understand where I have to write the code: in the Type table or in
the main table in the Type column. Also I don't know what means
ManufacturerComboBoxName and the forms in your code. I just have added lookup
columns and I didn't use any comboboxes or other MS forms.
Please, help me a little more.
 
J

Jeff L

Sorry. I was suggesting that you do this via a form instead of the
Lookup column. I think you will find it easier that way.
 

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