1
votes

In my Access database I have an inventory table and a sales table, and a form for each. The sales table needs the same data as in the inventory table. What I want is a simple and easy way where you can create a new sales record by entering in, for example, the barcode for the product in the sales form. Is there a way the form can refer to the inventory table and fill the rest of the fields?

1

1 Answers

2
votes

You can do this using VBA. On one of the events when scanning a bar code, you can do a look up and have it fill in the rest of the info.

But...

If I understand your tables correctly, you don't have a normalized database. You should never repeat data if you don't have to. In your case, all you need is the product ID. With that, you can link to the inventory table for the rest of the info when displaying and/or printing your sales records.

Here's some info on normalizing a database.