Then you need my
"Automatically add a Checklist to MS Access" YouTube PlayList.
Automatically fill a "Check List"
Sometimes you need a checklist in your MS Access database. You might be tempted to do this by creating a set of fields across in your table, however this is not considered good design. A better way would be to have a table which automatically fills with the "check items"....
Kept Simple
In this article I would like to demonstrate one method of achieving this. I will try and keep the terms I use to describe this process as general as possible, so that it is easy to relate to the structure in different circumstances.
The Checklist Used
In searching the Internet for checklists, it took me a while to find one that fitted my needs, unfortunately it was a "Wedding List". I apologise if my choice terrifies any gentlemen reading this.
3 Tables Required
The minimum number of tables required to make this work is 3 tables, I have given these generic terms: master, data and list. To explain the use of these tables I will refer to a specific case. Consider a business which manages weddings for couples.
In this case the master table "tblMaster" will contain details about the "wedding planners" customers.
The data table "tblData" will store the data for each individual customer.
Finally a table "tblList" that lists the "check off" items that need to be transferred to the data table "tblData".
The transfer of the list into the data table is performed by just two functions "Copy List" fCopyListToData, and "Append List" fAppendListToData. There are several other supporting functions in this example.
fCopyListToData puts the data from the list (tblList) into a recordset and then loops through the record set extracting the Row information from each field, then transfers that information via the function fAppendListToData into the data table "tblData".
"tblData" is what this code is about, it is this set of data that is created. Looking at the data table (tblData) we have five fields: dataID, dataLinkID, dataSets, dataItems and dataTickedOff.
dataID is not necessary and can be ignored.
dataLinkID is used to relate the values in this table (tblData) to the master table (tblMaster).
"dataSets" would not be necessary if you only had one set of data in your list. It is quite common to have a list divided into separate sets of information so in that instance it would be required and really for a single list with only one set, then you just add a "1" (or some other identifier) and treat it as if it was a set from a number of sets.
"dataItems" links back to the table list "tblList" and can be used to find the string value related to each item.
"dataTickedOff" is a boolean field which allows you to to flag whether a list item has been done, or not done.
I also produced these slides (presentation)
on Google Docs:- | "List To Data" but felt they needed some extra explanation hence the first video, and then I thought what the hell ... do some more videos.
I'm now working on a set of videos showing how to add and display a set of multiple check Items. My YouTube Playlist
"Adding Multiple Checklists to MS Access" is now available...
Originally posted here:-
http://www.access-programmers.co.uk/forums/showthread.php?t=263639