Free Lessons
Fast Tips
Topic Index
Home   Courses   Seminars   Templates   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > Forums > Access
Access Forum

Back to Access Forum

Multivalued field Upload Images   Link  
Harold Laski 
12 months ago
I have a customer table called CustomerT and a query called CustomerQ. I tried to create the following: Customer: [FirstName] & " " & [MI] & " " & [LastName] it worked fine. But as soon as I added the [Suffix] it gave me an error message that [Suffix] is a multivalued field and cannot be used. This is what got me the error message. Customer: [FirstName] & " " & [MI] & " " & [LastName] & " " & [Suffix]. Why is Suffix a multivalued field?
Harold Laski
12 months ago
Thinking on it I assume that means that Suffix uses a drop-down menu for Jr., Sr., I, II, III.    So if it is a multivalued field how do I use it to create the Customer: [FirstName] & " " & [MI] & " " & [LastName] & " " & [Suffix]
Adam Schwanz
12 months ago
You shouldn't use multivalued fields. :P Evil Access Stuff
Adam Schwanz
12 months ago
How many columns are in suffix and what is the bound column?
Scott Axton
12 months ago
Harold is the field a MultiValued Field?
Go into design mode and look at the Suffix properties --> lookup
Look for Allow Multiple Values

Sounds like you set up your lookup incorrectly.
We might need to recreate that lookup but lets find out first.
Kevin Yip
12 months ago
Your [suffix] field is a multivalue field.  A multivalue field is not a string, so that's why you can't use string concatenation such as [firstname] & " " & [lastname] & " " [suffix].

A multivalue field contains several values within, and each value is accessed with the .Value property.  E.g. [suffix].[Value]

If you use the query below, it will work, but it will not give you the result you want:

SELECT [firstname] & " " & [lastname] & " " [suffix].[Value] As fullname FROM MyTable

Instead of "John Doe Jr. Esq. MD.", the query above will yield:
John Doe Jr.
John Doe Esq.
John Doe MD.

In order to get "John Doe Jr. Esq. MD.", you have to use VBA to "loop" through all the values within the multivalue field in order to access all the values in the suffix.

This is one of many reasons why multivalue fields are to be avoided.  It's a badly implemented feature in Access.  But I've seen it implemented well in other database environment.

If you go to table design and remove "Allow multiple values", you will lose all your data.

A much better way to store multiple suffices is to store them in an actual table separately, and link it to the first name-last name table in a one-to-many relationship.  You still would have to use a recordset loop to get all suffices in a string, but you wouldn't have the headaches of a multivalue field.

This thread is now closed. If you wish to comment, start a NEW discussion, below.

Back to Access Forum Comments

Start a NEW Conversation
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
Subscribe to Access Forum
Get notifications when this page is updated

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 9/28/2023 1:20:53 AM.