473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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.
Jun 1 '21 #1
5 3431
NeoPa
32,556 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.
Jun 1 '21 #2
isladogs
455 Expert Mod 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.  
Jun 2 '21 #3
NeoPa
32,556 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.
Jun 3 '21 #4
isladogs
455 Expert Mod 256MB
Yes, I avoid them as well. In fact I wrote this article Multivalued fields... and why you really shouldn't use them
Jun 3 '21 #5
NeoPa
32,556 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.
Jun 3 '21 #6

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

Similar topics

11
by: pmarisole | last post by:
I am trying to use the vbscript "split" function on a multi-select field. I am trying to do a mass update of several records at a time. I am getting an error and I'm not sure what to do. Here is...
2
by: stoogots2 | last post by:
I have a field named sList in a Sql Server database table. The field has multiple delimited values (delimited with "|"). Example could be "1|2|3|4|5". I have a view with several fields (including...
0
by: lupis | last post by:
I am pretty new to vba. This is what I am trying to achieve. I have a form that onload displays all records in a form. I also have a searchbox with a button that should be able to take multiple...
15
by: amy1 | last post by:
Hello everyone, I'm new here and new to Access2007 as well! I have a multi-value field in a form, and would like to calculate the total of the selected values in this field and place the...
3
by: timleonard | last post by:
I use a query to select several fields from the table including a multi-value field. I then use the "DoCmd.TransferSpreadsheet acExport acSpreadsheetTypeExcel12" to send the info to an excel.xlsm...
19
by: jaad | last post by:
how do you reference a single value field to a multi-value field? I sometime use a macro in form1 to open form 2 containing the same ID example: Open form: WorkOrder where condition: ="="...
3
by: WaqasAnsari | last post by:
This is what I am working on. When patients count is 0, it works, but when it is increased, suppose 1, it gives an error: "An UPDATE or DELETE query doesn't contain Multi Value Field." What's the...
17
by: Michael R | last post by:
Hi. I'm using Access 2010 x86 I'm trying to create a Multi Value Field in a table using DAO, with the following code: Sub Test1() Dim db As dao.Database, tdf As dao.TableDef, fld As Field Set...
8
by: lineone | last post by:
I have two tables The first, MainTBL, has the following fields: ID DefFIRST DefMI DefLAST DefSUF DefDOB
6
by: BikeToWork | last post by:
Is there some easy way to "flatten" the multiple values from a multi-value field? I should state at the outset that I hate multi-value fields, but unfortunately they were used and I need to retrieve...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.