Underlying tables problems

E

ember

Hello, as BruceM suggested, i'm starting a new thread to explain myself
better about my problem.
Here it is: In my database, i have to create printable orders for
material that is being returned to their suppliers. in the Material
Return table, i have (amongst others not relevant here) the Supplier
field and the Supplier Contacts field. the relationships are "Material
Return - Many to one - Suppliers" and "Suppliers - one to many -
Supplier Contacts". What i need is this - in the Suppliers Field inside
the Material Return Table, that the lookup will fill in the supplier i
pick. And based on that, in the Supplier Contacts field i need to be
able to fill, again with the help of lookup, only with the contacts
that belong to the supplier i have picked in the Supplier field. The
only thing i'va achieved so far is that in the lookup on the Supplier
contacts field, even though i have already picked a supplier, it
allways displays every Contact there is on the Supplier Contacts Table.

Oh, the SupplierID (PK in the Supplier table) is related to a field
called "Supplier" in the Supplier Contacts table.

please help, i've been trying this for two days now and still haven't
got anywhere with this...

if you need any other info, just say, i'll put it here for you.


Thanks
 
A

Al Camp

First, you don't mention any form name... so subsitute your own names in
my examples.
You wrote...
Oh, the SupplierID (PK in the Supplier table) is related to a field
called "Supplier" in the Supplier Contacts table.
In the query behind the SupplierContact combo (call it
cboSupplierContact, the Supplier field should have a criteria of...
=Forms!frmYourFormName!cboSupplier
This restricts the records returned by cboSupplierContact to only those
SupplierContacts who have a Supplier value equal to that selected in
cboSupplier.
Use the AfterUpdate event of cboSupplier to Requery cboSupplierContacts
so the 2 will always be in synch.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
E

ember

aL thanks, but i've tried this before and the cboSupplierContacts
returns empty.

any other suggestions? (the real names are:MyForm: Form_Guia;
Supplier(table): Fornecedor; Supplier Contacts: Contactos and
cboSupplierContacts: Contactos_Query)


thanks once again,
 

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