2 days ago: Power and Internet are out in my office due to Hurricane Ian. Click for details.
Free Lessons
Fast Tips
Topic Index
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
Home > Forums > Access
Access Forum

Back to Access Forum

Multivalued field Upload Images   Link  
Harold Laski 
9 days 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
9 days 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
9 days ago
You shouldn't use multivalued fields. :P Evil Access Stuff
Adam Schwanz
9 days ago
How many columns are in suffix and what is the bound column?
Scott Axton
9 days 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
9 days 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.
Add a ReplyUpload an Image

Back to Access Forum Comments

Start a NEW Conversation
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

Check out these other pages that may be of interest to you:

9/27/2022Report Border
9/26/2022First Day of Month
9/23/2022Before Update
9/22/2022Synchronize Subforms
9/20/2022Link Master Fields
9/18/2022Sequential Annual Coding
9/15/2022Resize Forms

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
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn