create duplicate fields

G

Guest

Ok here is my situation.
When my users create an invoice there is a subform that is a continuous form
that is for the inventory related to the invoice.
Now for example, lets say the order contains 5 dell 383 computers. Normaly
the user would have to go through and populate all the fields in inventory 5
seperate times, even though they are all identical. There is a field that is
labled quantity and I would like it so that after the field is updated it
will create X(the amount the user typed into this field) amount of duplicate
iventory items.

*The reason that I need a new row for each is that each inventory item has a
unique serial number.
*Also note, that I tried to just highlighting the field and copying a
pasting. While this did create seperate inventory items, for some reason the
fields that I pasted were not being added into the total cost function I have
built in.

Thansk for your time!
 
J

Joseph Meehan

GregB said:
Ok here is my situation.
When my users create an invoice there is a subform that is a
continuous form that is for the inventory related to the invoice.
Now for example, lets say the order contains 5 dell 383 computers.
Normaly the user would have to go through and populate all the fields
in inventory 5 seperate times, even though they are all identical.
There is a field that is labled quantity and I would like it so that
after the field is updated it will create X(the amount the user typed
into this field) amount of duplicate iventory items.

*The reason that I need a new row for each is that each inventory
item has a unique serial number.
*Also note, that I tried to just highlighting the field and copying a
pasting. While this did create seperate inventory items, for some
reason the fields that I pasted were not being added into the total
cost function I have built in.

Thansk for your time!

Your perceived problem comes from thinking spreadsheet when in fact you
are using a relational database.

You need to perform what is called normalization of the database. It is
a design process.

While this may not apply to you 100% hopefully this example will start
you thinking in the right direction.

You have an inventory. You may stock 100 different items, You may have
0 or more of any individual item. For example you may have

20 #45 computers
15 Model ERM hard drives
2000 USB cables.
etc.

You would want a list of items and the number on hand. That information
would be in one table

You then may have a sale John Smith of:

2 #45 computers
1 Model ERM hard drives
3 USB cables.

That would be another table listing what was sold on a specific sales
order

Yet another table will list John Smith as well as his address telephone
number etc.

All those tables hold information about one kind of thing (inventory,
sales, customers)

Using queries, forms and reports you interact with all the tables. For
example when you have a sale you put in John Smith (or customer #103) and
his name and address can appear taken from the customer table. Next you
type in the Item # or name of the 2 computers and and information about the
computers is added including checking to make sure you have some. You add
the number sold.

In a report you can print out the sale listing everything sold to who
etc. You can also make up a report showing the number of remaining
computers etc. You don't store this information, it is computed anytime you
want it so additional sales and returns are recorded.

The Northwind example database that ships with Access has some examples.

That is why Access is called a relational database since the data is
related in different tables.
 
G

Guest

I understand what you are saying and appreciate the time you took to respond.
I can see how you came to your conclusion, however my database has multiple
tables and multiple relations.

This is actually for a puchasing unit withing my company.
Each invoice has multiple items purchased.
I have an inventory and invoice table.
Each inventory item needs to be tracked and therefore thier serial number is
scanned into the inventory table when we recieve them.
Because we have to track each asset, each asset needs its own row within the
inventory table
This problem reverts back to my orginal question.

Let me know if you need any other info

Thanks again!
 
J

Joseph Meehan

GregB said:
I understand what you are saying and appreciate the time you took to
respond. I can see how you came to your conclusion, however my
database has multiple tables and multiple relations.

This is actually for a puchasing unit withing my company.
Each invoice has multiple items purchased.
I have an inventory and invoice table.
Each inventory item needs to be tracked and therefore thier serial
number is scanned into the inventory table when we recieve them.
Because we have to track each asset, each asset needs its own row
within the inventory table
This problem reverts back to my orginal question.

Let me know if you need any other info

Thanks again!

Did you know that a Control ' (Control single-quote) will copy the data
from the prior record? Will that help. You could write some VBA to do it,
but I wonder if it would be worth the real world work?
 

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