MajP
You've got your good things, and you've got mine.
- Local time
- Today, 17:04
- Joined
- May 21, 2018
- Messages
- 9,693
Since there is a lot of discussion now on MVF, I created this thread to provide discussion on understanding how they work, what you can do with them, and how to use them. There is plenty of discussion of the cons of MVF and what you cannot do with them, so no need to rehash that here.
However, if you want to discuss other topics related to MVF not how they work and how to use them I created this thread.
But assuming you are planning to use them this thread should focus on things like
1. How they work especially what is happening behind the scenes
2. How to query them, especially related data in the selection table
3. How to access in code such as Recordset of related values
4. If using them where you can get into problems.
To start with in order to understand some of what happens in the background, I strongly recommend reading Colin's posts
isladogs.co.uk
www.isladogs.co.uk
www.isladogs.co.uk
I will provide this example that I got from someone (not mine) that has some interesting functions that work with the MVF fields. I demo a report pulling the child records of the hidden form.
My opinion is that there is a lot you can do with MVF, but you really need to understand the limitations. My issue with them they are seen as a shortcut for novice developers, but that is likely the person who will get into trouble because they do not understand how they work. If you spend some time understanding a little how they work then you can make the decision if they are safe to use for your needs. If you do not understand them, then you could end up painting yourself in a corner where you cannot do what you want with the data.
Topics
Querying an MVF with Linked Lookup Table
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970130
Demo more complex query with Lookup
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970131
MVF Enforce Referential Integrity
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970157
Get Recordset of Values
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970230
Save Foreign Key or Value in MVF
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970561
However, if you want to discuss other topics related to MVF not how they work and how to use them I created this thread.
Multi value Fields (MVF) Various Topics
I created the below linked thread for people to discuss how MVF fields work and if you plan to use them what you need to know. https://www.access-programmers.co.uk/forums/threads/mvf-technical-discussion-and-uses-if-you-plan-to-use-them.334422/ It was meant to be narrowly focused on that topic...
www.access-programmers.co.uk
But assuming you are planning to use them this thread should focus on things like
1. How they work especially what is happening behind the scenes
2. How to query them, especially related data in the selection table
3. How to access in code such as Recordset of related values
4. If using them where you can get into problems.
To start with in order to understand some of what happens in the background, I strongly recommend reading Colin's posts

Multivalued Fields
Multivalued fields (MVFs) were introduced with Access 2007. This article explains what MVFs are and how they can be used. However, most experienced developers avoid them completely. This article explains why this feature is really not a good idea


Complex Data Types in Access
This article explains what the various complex datatypes are and how to work with these safely.


Attached, associated, detached . . .
This article discusses the hidden attached system tables required by the use of complex datatypes in Access. It also covers an issue when deleting tables with column history memo fields as not all tables are removed by the process.

I will provide this example that I got from someone (not mine) that has some interesting functions that work with the MVF fields. I demo a report pulling the child records of the hidden form.
My opinion is that there is a lot you can do with MVF, but you really need to understand the limitations. My issue with them they are seen as a shortcut for novice developers, but that is likely the person who will get into trouble because they do not understand how they work. If you spend some time understanding a little how they work then you can make the decision if they are safe to use for your needs. If you do not understand them, then you could end up painting yourself in a corner where you cannot do what you want with the data.
Topics
Querying an MVF with Linked Lookup Table
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970130
Demo more complex query with Lookup
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970131
MVF Enforce Referential Integrity
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970157
Get Recordset of Values
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970230
Save Foreign Key or Value in MVF
https://www.access-programmers.co.u...s-if-you-plan-to-use-them.334422/post-1970561
Attachments
Last edited: