Can related Access form fields autofill after 1 field is entered?

G

Guest

I am trying to make the value of 2 fields in a form named "FRM-orders"
relate. For instance, selecting a company’s name (using a dropdown menu if
possible) automatically fills in the company’s ID number, both which can be
found on a table labeled “TBL-Suppliers.â€
 
R

Rick Brandt

RachelsFrustration said:
I am trying to make the value of 2 fields in a form named "FRM-orders"
relate. For instance, selecting a company's name (using a dropdown
menu if possible) automatically fills in the company's ID number,
both which can be found on a table labeled "TBL-Suppliers."

Proper Relational Database design would dictate that you not copy data
redundantly like that. Your order records should only store the CompanyID.
You can then use a query or any number of various lookup methods to DISPLAY
the customer name, but you should not store that as a field in the order
record.

An easy way to do this is to use a ComboBox for CompanyID with a RowSource
that pulls the CompanyID and CompanyName (second column hidden if you like)
from the Companies table and then in an unbound TextBox you can display the
data from the extra column with an expression like...

=ComboBoxName.Column(1)
 
G

Guest

The problem is that multiple users will create order requests in this
database, and will likely misspell the vendor names, and definitely won’t
know vendor ID#s, since there are hundreds of them. It would be convenient
for there to be a drop down list that reflected the Vendor name and ID, as
you suggested. I haven't had any luck using combo boxes, so any details
would be greatly appreciated!
 

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