Arrays in Access

B

Brian C.

Is is possible to create an array in an Access table - like 12 months of
sales values for a salesrep?
 
R

Roger Carlson

What you would do is create a separate table called tblSales or something
and add the SalesRepID to this new table as a Foreign Key. This will allow
you to create a relationship between the two. Something like this:

SalesRep Sales
====== ======
SalesRepID--| SalesID
LastName |---<SalesRepID
(etc) SalesValue
(etc)

In the SalesRep table, SalesRepID is an autonumber Primary Key. In the
Sales table it is a long integer. (SalesID would be an autonumber primary
key for Sales)
 
B

Brian C.

So I would need to put in the Sales table the month # (1-12) and then the
sales figure for that month giving me 12 records per sales rep? I suppose I
could also put in the year, ...
 
R

Roger Carlson

Absolutely correct! However, I would probably store the month as a
Date/Time field, because there are a LOT of built in Date functions in
Access that give you a lot of flexibility. You would also not need to store
the year then.
 
B

Brian C.

Good Point!
Thanks Roger

Roger Carlson said:
Absolutely correct! However, I would probably store the month as a
Date/Time field, because there are a LOT of built in Date functions in
Access that give you a lot of flexibility. You would also not need to store
the year then.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

suppose months
 

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