Is it possible to create an array field

hammerva

Registered User.
Local time
Today, 12:33
Joined
Dec 19, 2000
Messages
102
Hello again. :)

I have a table called Meetings. I want to create a field called Topics that contains the topics discussed in the meeting. I would love to be able to create an array like field that allows me to enter multiple topics for one meeting.

Is this possible in Access 97? I didn't see a array tape among data types.

Thanks
 
An Array field type? In a word, No.

Doing this would de-normalize the tables involved.

The excruciatingly correct way to do this is to assure the presence of a small primary key (like an autonumber) on the record that describes your meeting, then create a child table, many-to-one with the meeting record, that lists topics.

The second-best (and surely very ugly) way is to make the topics field a MEMO field (which cannot be used in certain ways that TEXT fields could be used), then enter data in a list, where each line is ended by (I think) SHIFT-ENTER (which embeds a line break in the text).
 
I was thinking I would have to create a sub table for this process. And logically it probably makes more sense.

I was hoping I didn't have to create a subform though. Those have already been a pain the butt for me. Is there a way to create an array of text boxes like Me.Comments(1)? Then I could just loop through the text boxes and do processing that way.

Just wondering. Oh and thanks.
 
VBA does not support control arrays as VB does but you can loop through the controls collection yourself. I would not recommend this as a solution since you would have to set an arbitrary limit to the number of topics you are able to store. Learn to use subforms. They don't require any code and as long as you get the master/child links properly set, they are pretty painless.
 

Users who are viewing this thread

Back
Top Bottom