468,469 Members | 2,640 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,469 developers. It's quick & easy.

How to Count Multi Value Field

I have a multi value field selected from a dropdown list which can have many value like A 01, B 90, C 40, etc.
How to count this. Please help me as I am newbie in MS Access.
1 Week Ago #1
5 2117
NeoPa
32,092 Expert Mod 16PB
Exactly what is it that you want to count?

I believe that MVFs come as standard with a Field that indicates how many items there are in the MVF. On the other hand you may be after the number of items in your ComboBox Control. That also has a .ListCount property that tells you how many items are in its list.
1 Week Ago #2
isladogs
259 Expert 256MB
@NeoPa
Just for info, attachment fields (which are of course a special type of MVF) do have a built in file counter but 'standard' MVFs don't have the equivalent feature.

@Bhaghaban
If you want to count the number of MVF items in each record create an aggregate query grouping by the primary key field and count the MVF field. For example
Expand|Select|Wrap|Line Numbers
  1. SELECT tblMVF.ID, Count(tblMVF.MVF_Field) AS CountOfMVF_Field
  2. FROM tblMVF
  3. GROUP BY tblMVF.ID;
  4.  
1 Week Ago #3
NeoPa
32,092 Expert Mod 16PB
IslaDogs:
Just for info, attachment fields (which are of course a special type of MVF) do have a built in file counter but 'standard' MVFs don't have the equivalent feature.
Ah. That makes sense. I avoid them myself if I'm honest so not the best source of such info.
1 Week Ago #4
isladogs
259 Expert 256MB
Yes, I avoid them as well. In fact I wrote this article Multivalued fields... and why you really shouldn't use them
1 Week Ago #5
NeoPa
32,092 Expert Mod 16PB
Colin Riddington - Mendip Data Systems:
Whilst it is possible to run action queries involving MVFs it is very messy.
It is very easy to get extremely confused about the data and make mistakes doing so.
By contrast, if you had stored your data in a normalised table with one value per record, searching, filtering & editing would be trivial.
It would also only require ONE table rather than THREE
Nice one. Very well presented and I love your conclusion statements. It makes it easy to understand why they really aren't a good idea to get involved with.
1 Week Ago #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by NPC403 | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.