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]
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.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.