Multi Valued field - how can I display contents?

Jubert

New Member
Joined
Jun 1, 2016
Messages
28
I am pulling a sales split table into MS Access from an accounting package.

The table only has 4 columns.
In the design mode I have entered the criteria ="John Jones" against the salesperson field and when the query is run I get John Jones entries but also other Salespeople so I'm assuming the field must be mutli valued. This makes sense as a number of sales people may work on a given contract. But how do I see what is in the field? Currently Access is just displaying one name even though the field must contain others.

Many Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Duh, Micron is right.

. I think you can do this with a query that returns the .Value from the multi field, then query that query by name. The first query will produce the names in rows; the second would filter by name.

So just (though it seems crazy) using a query on the query:
Code:
SELECT B.* FROM 
(
SELECT 
	A.CH_CODE, 
	A.CH_USER6, 
	A.SALES_PERCENT, 
	A.Split
FROM 
	dbo_UDEF_SALES_SPLITS A
WHERE 
	A.CH_USER6 = "John Jones"
) B
WHERE
	B.CH_USER6 = "John Jones"

The contents of the table in Post 9 shows why the data would be so garbled (or not, depending on point of view). JOHN is a salesperson on the same record as MARK so the results are correct.
 
Upvote 0
I'm still not sure it is a multivalue field

the name of the table is
dbo_UDEF_SALES_SPLITS
and Access usually puts
dbo_
in front of tables that are linked from SQL Server or Oracle or other server databases

and I may be mistaken, but I don't think any of them allow multivalue fields

so I'm a little confused

that's why I'd like to see the table design
I'd also be interested in hearing what kind of database this table is linked from


 
Upvote 0
I'm still not sure it is a multivalue field

the name of the table is
dbo_UDEF_SALES_SPLITS
and Access usually puts
dbo_
in front of tables that are linked from SQL Server or Oracle or other server databases

and I may be mistaken, but I don't think any of them allow multivalue fields

so I'm a little confused

that's why I'd like to see the table design
I'd also be interested in hearing what kind of database this table is linked from



You're right James it is a linked SQL table.

I don't have permissions for this database remotely so will post the shot in imgur tomorrow. It all looked fairly tame in design view but I have an untrained eye.
 
Upvote 0
Micron/Xenou I will try the query route and let you know where that takes me although I did attempt before when I first discovered the issue and didn't have much success.

Thanks for posting.
 
Upvote 0
Just to set the scene further. Essentially what I am trying to do is return a table of Sales by Salesperson. If I can show the three names in cell in column B it would allow me to do a calculation on the amount in column C. The colour coding on the table is just to represent that the data is returned from 3 different tables.
Excel 2010
ABCDEFGHIJ
1CH_CODECH_USER6CH_NETTSALES_PERCENTSALES_PERSON1SALES_PERCENT1SALES_PERSON2SALES_PERCENT2SALES_PERSON3SALES_PERCENT3
2MW24248JOHN JONES600050JOHN JONES50GARY ROBINSON10MARK OSGERBY40
3MW24248JOHN JONES600050JOHN JONES50GARY ROBINSON10MARK OSGERBY40
4MW24248JOHN JONES600050JOHN JONES50GARY ROBINSON10MARK OSGERBY40

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2
Whilst entering criteria against CH_USER6 in design view I can put "JOHN JONES", "GARY ROBINSON" OR "MARK OSGERBY" and return the three records. However if I write a statement asking if CH_USER6=SALES_PERSON2 it returns FALSE. I was hoping to use the IIF with the orange table to return what I need.

I haven't had any success with the .value query yet
 
Upvote 0
The colour coding on the table is just to represent that the data is returned from 3 different tables.
Maybe we could write a query using the three tables, then? That would be ideal. What do you mean by three tables?

Also, how are you getting this data into Excel? Is it from Access, from SQL, from some other source?

Also, btw, the sales percents add up to more than 100% in your last example for MW24248!
 
Upvote 0
I don't see where we've established that this is indeed a multi-value field...
 
Upvote 0

Forum statistics

Threads
1,221,813
Messages
6,162,126
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top