Updating tables

G

Guest

I'm new at Access and am trying to start a business program that we will use
as our database. My question is in regards to auto filling on forms and
tables based on company info and a company ID #.

I have two tables: Add Info and Company Info. In these tables I have two
fields that are named ID and Company. In the Company Info table, these two
fields list the ID # and Company Name for our customers. In the Add Info
table, I would like the Company field to automatically fill in the company
name whenever I input the ID. I've tried several different SQL statements
and couldn't get any of them to work. Any help on this would be appreciated.
Thanks!
 
P

Pieter Wijnen

The whole point of a relational database is *not* to store information like
Company Name in more than one table
base your form on a query linking the two tables on CompanyID

HTH

Pieter
 
J

John W. Vinson

I'm new at Access and am trying to start a business program that we will use
as our database. My question is in regards to auto filling on forms and
tables based on company info and a company ID #.

I have two tables: Add Info and Company Info. In these tables I have two
fields that are named ID and Company. In the Company Info table, these two
fields list the ID # and Company Name for our customers. In the Add Info
table, I would like the Company field to automatically fill in the company
name whenever I input the ID. I've tried several different SQL statements
and couldn't get any of them to work. Any help on this would be appreciated.
Thanks!

The Add Info table - unless I'm misunderstanding - should simply NOT EXIST. At
the very least, the company name field should not exist in it!

Relational databases use the "Grandmother's Pantry Principle": "a place - ONE
place! - for everything, everything in its place". The company name should
exist in the Company Info table, and noplace else; when you need it in
conjunction with other data, use a Query or a combo box on a Form or one of
many other techniques to bring them together.

John W. Vinson [MVP]
 

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