Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
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 
2 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
2 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
2 months ago
You shouldn't use multivalued fields. :P Evil Access Stuff
Adam Schwanz
2 months ago
How many columns are in suffix and what is the bound column?
Scott Axton
2 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
2 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
Subscribe to Access Forum
Get notifications when this page is updated
 
 

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

11/28/2022Top X
11/27/2022System Settings
11/25/2022Application Title
11/24/2022Full HTML Editor in Access
11/24/2022Change Database Title
11/23/2022Other Names
11/21/2022Check Icon File
11/21/2022Check Icon File
11/18/2022Archive Records
11/17/2022InStr Function
 
 

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

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
amicron@gmail.com
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn