Data array

K

KLP

How do I create a data array for data input of an unknown volume for a
particular field? If I knew there would be 12 transactions, I could write
the database with 12 fields, but I don't know the number of transactions.
Any ideas?
 
D

Duane Hookom

Try use a relational database structure. This generally means you can enter
an unlimited number of transactions.
 
B

Bruce

To expand a bit on what Duane wrote, tblTransactions would be a separate
table. I don't know what your main table is (i.e. with what are the
transactions associated), but whatever else it has it contains a primary key.
Let's call the table tblMain, and let's say the PK is called MainID, and is
of data type autonumber. tblTransactions would contain its own primary
key, a foreign key (data type Number), and whatever else you need to record.
I usually give the foreign key field the same name as the PK field (MainID in
this case). Create a one-to-many relationship between the PK and the FK
(Tools > Relationships). Forms make the data entry much easier. Create a
form from each table. Make the default view for frmTransactions Continuous
or Datasheet. In design view for frmMain, drag the icon for frmTransactions
onto frmMain.
 

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