MajP
You've got your good things, and you've got mine.
- Local time
- Today, 05:19
- Joined
- May 21, 2018
- Messages
- 9,989
I think there are two big differences where MVFs are fine and where you most likely will get into problems down stream.BlueSpruce, I don't do anything special with MVFs. I store information in lookup tables that are managed using their forms. Like with everything else in my databases, the goal is to create reports and to make verbal suggestions to users (TTS).
MVFs do the first well because they display multiple attributes in columns. For example, if I want to see all the diseases that a person has then an MVF in a form will allow me to select all of their diseases for every member of a family unit, and it will show the disease names using commas or some other punctuation mark. The report would then show them in a column, so it will be easier for the user to read the information. Checkboxes make selecting one or more diseases easy for the user.
This doesn't mean that there aren't other ways to do this. I am only saying that I like using MVFs. They require no code, and they are intuitive to use for attribute information.
Also MVFs in reports expand downward automatically when directed to do so.
This works well for both my forms and reports because my tables have many fields. I optimize for space on both the monitor and on paper. Some of my tables have 10 MVFs. I place them strategically on forms and reports. Unlike most developers, I don't need to manipulate attributes in MVFs. My reports are designed to be documents, not lists of data.
To let users edit information in MVFs, I use forms for my MVFs. I label those forms as lfrm to distinguish them from main forms and subforms. This way Access groups and sorts my forms and other objects using assigned prefixes. I also give the objects similar names. So for one table, say Diseases, the table is named tblDiseases, the lookup table is named lkuDiseaseType, the main form is frmDiseases, and the form to edit the lookup table is lfrmDiseaseType, the main report is rptDiseases, and so on.
The best thing about using MVFs for me is reusing them multiple times. So the list of diseases can be used to describe a person's health, used with good foods to eat, and with bad foods to avoid. I can also use the list with foods that have been recalled by the government and producers. This is my approach to normalization, but I am not sure that that is what it is. By the time I am finished, MVFs will allow for Many-to-Many-to-Many relations.
I call it a "Simple List" or a "Complex List". You seem to be suggesting "simple lists" and thus not a big deal to go with MVF. But you really need to think about the potential limitations now. And since you do not know where this is going, you can paint yourself into a corner.
1. In the Simple List, the data you are choosing to put in your MVF comes from a table with few fields. Mostly it is just a value. This list does not hold any foreign keys to other related tables. Other tables do not have foreign keys to this list. There are no fields such as dates, currencies, or other values that you may need to do queries against. So a list of products, Disease types where you are just concerned in showing the choices. If all you are ever going to do is show these choices and query against these choices then using MVF is fine
2. In the Complex List the table you are pulling from has a lot of information to include foreign keys to other tables or other tables referencing this list. Lets assume DiseaseType has the following fields
tblDiseaseType
- DiseaseName
-DiseaseDescription
-DiseaseCategory_FK ' foreign key to disease category table
- DiseaseCricality_FK ' foreign key to criticality table
- PercentPopulationAffected ' numeric
-RiskPercentage ' numeric
and a related table
tblOrgansAffected 'references tblDiseaseType
- DiseaseTypeID_FK ' a foreign key to the disease table
- OrganID_FK ' a foreign key to the organs table
Because I am tracking that level of detail it tells me I probably want to do things like answer
- Show all family members with diseases that are high risk and all organs affected
- Show family members with a disease risk over 70%
- Count total family members with a disease in the parasitic infection category that are high criticality
The above questions are trivial in a standard design; the above questions are near impossible to answer with an MVF in the mix.
So it takes some hard thought of the downstream effects and what I will need to do with the data.
You say that your "requirements" are continually changing and do not know what functionality you will need. If I am 100% confident a simple list of choices is all the future holds then knock yourself out with MVF if you understand the other limitations. But if you think you want to do more with the data in the list table then just show and query the choices, you are better off putting the work in now. Sometimes a simple list starts to grow because you decide you want to do more with the related data.