-1

I have a table, called Contracts, where I want to have a field that is an array of another table instances called Goods. Is there a way to do it through MS Access GUI?

enter image description here

Are arrays even a thing in RDBMS?

p.s. I am very new to databases, so sorry if it's a dumb question.

Ruslan Plastun
  • 1,985
  • 3
  • 21
  • 48
  • 2
    Not a good idea in database land. You should store each value in a row (in another table). This might help: [How to handle arrays in Access tables](https://stackoverflow.com/questions/43348622/how-to-handle-arrays-in-access-tables?rq=1) – Rene Mar 05 '20 at 18:52

2 Answers2

3

Relational datbases dont' work the way you are asking. You can't find a answer and soluion to your question becuase your question is all wrong, incorrect and ignores how databases work.

If you have some contacts in a table, and you want to attach some goods (say purchased), then you simply need to add a table called:

GoodsPurchased

You will relate that table to table contacts.

The relationship will look like this:

enter image description here

The result will be a table that looks like this:

enter image description here

Note that as a result of the relationship, the + sign that appears for each row.

If you click on the + sign, then you can add as many GoodsPurchased for one row (one Contact) as you want. This is the WHOLE essence of database systems, and why they are oh so often better then a spread sheet.

So, for each contact, you can add or "attach" as many goodsPurchased (the child table).

The result will look like this when you hit the + to expand the child table, and you can enter as many "things" for each contact.

enter image description here

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51
0

in sql an array and a table are the same thing. in the form you put the "array" table either as a: *sub form bound to a table *list box bound to a table ….technically you could also use a combobox…..

the presumption is the main form is bound to the main table.....the subform is inset into the main form while a list box is a control put onto the main form....

do it via forms rather than attempt to do at the table/field property level....

Cahaba Data
  • 624
  • 1
  • 4
  • 4