Linking to a Multi-valued Field

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Linking to a Multi-valued Field

Post by Sundog »

Question from a manager: He would like to use a multi-valued field to pick a name from a name list for example, then be able to pick a task associated with that person from a task number list.

I have not used multi-valued fields and would appreciate a link to more information, especially related to the above question.

One approach would be to pick a child record name, get the parent primary key, and query the child name table for all records where the destination field is equal to the parent primary key. Similarly, find all tasks associated with the child key. If this is going down the right path, how would it be implemented?
Sundog

User avatar
HansV
Administrator
Posts: 78485
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Linking to a Multi-valued Field

Post by HansV »

I'm sorry, your question is too vague. Please provide sufficient information about the structure of the database, for example by attaching a stripped down and zipped copy.

(I would prefer to avoid multi-valued fields. They violate relational database design.)
Best wishes,
Hans

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Linking to a Multi-valued Field

Post by Sundog »

Ah yes, too vague, sorta like the manager's question to me. I've asked him for structure info and will post when/if I get a reply.
Sundog

User avatar
Charlotte
Her Majesty
Posts: 499
Joined: 19 Jan 2010, 07:13

Re: Linking to a Multi-valued Field

Post by Charlotte »

May I suggest that the manager probably meant a combobox or listbox rather than a field? Multivalue controls are commonly used to select from a list of values, but the underlying field holds only a single value. As Hans pointed out, multivalue fields violate relational principles. Plus, they're next to impossible to query effectively. Multiselection controls present multiple values and allow the user to select one because they are based on a query or SQL select statement, or even a lookup table.
Charlotte