This video demonstrates a code module which allows you to change the colour of the selected option group label, and optionally collect the caption of the selected label.
Thursday, 25 April 2013
Option Group Label Color Change
This video demonstrates a code module which allows you to change the colour of the selected option group label, and optionally collect the caption of the selected label.
Thursday, 14 February 2013
Excel in Access (Part 1)
Excel in Access (Part 3)
Excel in Access (Parts 1, 2 and 3 as Video Instructions)
New! a follow on article
MS Access Your Data With Sub Forms
Problem for Excel Developers
One of the problems facing Excel developers moving into MS Access is actually the apparent similarity between MS Access tables and Excel spreadsheets.
MS Access is NOT Excel
This similarity of the "look" in both programs, the layout of the data, leads to the Excel developer mistakenly thinking that a database works in a similar way to a spreadsheet.
Flat File Database
Spreadsheets are very sophisticated tools for manipulating figures, and they can also handle data very well particularly in the form of a "flat file database". You can also use the flat file approach in MS Access, however MS Access is primarily a relational database, meaning that it has the ability to relate tables of information together.
Relational
It is by taking advantage of this relational property of the database that you can really make significant improvements to data handling. So if you have a spreadsheet that requires upgrading to a database to take advantage of this, then this article is for you.
Typical Spreadsheet Layout
Below is an example which shows columns that you would typically find in a spreadsheet, first name, last name for example. Then a variety of subjects, with a check box against each indicating that the subject has been taken, passed or possibly even failed!
Click on Image for Fullscreen View
Flat File is OK
A direct transfer of this spreadsheet layout into an MS Access table would be usable and indeed many Access databases are constructed in this way, and some sophisticated applications costing many hundreds of pounds are based on a flat file system. However as mentioned earlier, MS Access is a "relational" database, meaning that it has the ability to relate your data together.
You're Not Relational????
So how and why should you apply a Relational structure? Well it solves a lot of problems, there are many but I have noted the main ones below.
Uncharted Territory
The first most common problem I have noticed on forums for people with similarly designed tables imported from a spreadsheet is that they find it difficult to extract useful information, and this is one of the major reasons that you should consider constructing your new database in a different manner to your spreadsheet, no doubt you will be able to come up with your own unique methods of extracting the data, however you will find there is little help available, not because no one wants to help you, but because you are embarking into uncharted territory, "where no man has gone before".
Maintenance
Another reason, (not in any particular order of importance, the significance will change from project to project) what happens if you need to add an extra subject? Let's say the school starts offering French lessons, in the spreadsheet all you would do is add a new column "French" and indeed in your MS Access database you could also add a new column "French", however if the construction of your database is well advanced, in other words you have many queries and forms based on the table you are adding a new field to, then you will have to modify every single query and form that extracts information from this table, not something you want to do often!
Column Limit
Many modern spreadsheet programs can handle thousands of columns; however MS Access has a 255 limit to the number of fields in any particular table. So in the student table example, if you were at the 255 limit and you needed to add another subject then you would find yourself in a difficult position.
Relational Solution
So what's the solution? This is the part that is sort of counter intuitive, you actually construct two tables from the original table and link them together. This is the "relational" aspect of the database coming into play.
How?
If you look at the original layout of the data above you can ask questions about it, is there any data in the original table that is related? Looking at it, I would suspect all of the boolean columns (the check box columns, yes/no data) they are all the same, so they are a likely candidate for a separate table. And indeed there is an obvious name for this new table, they are all "subjects" that the student is or could take.
The New Table
So now you have a name for the new table, "Subjects" and to link it to the data remaining in the original table, (first name,- last name) it will need to have a field which contains a match to the RecordUniqueID field. For this example let's call this "MatchingID" then you need a field to record the subject and another field to record whether it is true or false. For the purposes of this demonstration I have terms these "TransposedSubject" and "TransposedData" and you can see what this should look like below:
Free Normalization Tool --- Download it Here How to use the Normalization Tool
Phone: +44 1635 522233
Mobile: +44 7747 018875
Email: email@tonyhine.co.uk
Excel in Access (Part 2)
Excel in Access (Part 3)
MS Access Your Data With Sub Forms
Excel in Access (Parts 1, 2 and 3 as Video Instructions)
Excel in Access (Part 2)
Excel in Access (Part 3)
Normalization Instructions (I'm going to leave these on Ecademy for now, they are too wide for direct transfer to here....)
Download the database used in the following videos here: (This is the "empty" database before the following modifications are carried out)
The following five videos comprise a total viewing time of approximately 21 minutes in videos of length from three to six minutes.
The video's below demonstrate a slightly different use for the Tool previously explored in text and picture based threads. In these videos I demonstrate how to: Not only transfer the data from a spreadsheet table, but also the identity of the data picked up from the field name.
Convert contacts Spreadsheet to MS Access database 1 --- 6min
The video below explores a table which is in "flat file" format, suggests how you can choose which rows and columns would possibly benefit from being transposed into a new table, then demos how to do this with the tool provided (A Form)
.
Convert contacts Spreadsheet to MS Access database 2 --- 3min
Explains how to remove redundant data from the table produced above, identifies a field that would benefit from being converted into a lookup table, and shows how to create a look up table from this field.
.
Convert contacts Spreadsheet to MS Access database 3 --- 3min
using the above look up table demonstrates how to replace the "text data" with a number which links the former text (now in the look up table) with the original row/record.
.
Convert contacts Spreadsheet to MS Access database 4 --- 5min
demonstrates how to create a form in datasheet view, and add a combo box to display the look up data
.
Convert contacts Spreadsheet to MS Access database 5 --- 4min
and then display that form as a sub form showing the telephone number, communication media list, as related to the contact.
.
The final database as completed in the above videos is downloadable from here: (this database contains all of the modifications as described in videos above)
Excel in Access (Part 1)
Excel in Access (Part 2)
Excel in Access (Part 3)
New! a follow on article
MS Access Your Data With Sub Forms
Excel Power Users Find MS Access Difficult
I've done a three part blog on why some Excel power users find moving to MS Access difficult. The video below is a verbal explanation I did of the first part of the three blogs, you can find the text the video is providing an explanation for here:
Excel in Access (Part 1)
YouTube Video HERE:
.....
....
...
..
.
Friday, 8 February 2013
Computerize your Business
Someone asked me how I go about compuerizing a business, this was my reply:
There are several ways; all have their pluses and minuses like everything.
One way is to start looking at your business processes and tailor them to fit on an A4 sheet of paper. If a task is complicated involving several/many stages, then use a master A4 sheet to control the individual steps.
This method is very handy if you have several people working in different areas, as even if you do not computerize your business, you at least develop a formal business process for each area which is transferable to someone else.
For example:
a) in the event someone leaves the business
b) business increases and you need to train up other people to do similar tasks.
c) a turnkey business is much easier to sell, and in your case franchise.
The idea is that the A4 sheet will become the computer screen layout, giving the computer programmer a good idea of what you want, and giving your employees a familiar interface when you eventually move on to the computer.
Another way as I already mentioned is to find a package that does much of what you desire, you may need to use more than one package, however I think you can see that “off the shelf” will give you a good idea of what you don't want, and makes it much easier to communicate with a programmer.
One of my USP phrases is that I am primarily a businessman that can program; this gives me a distinct advantage in the design stage.
The most formal method is to draw up a specification, this method involves a considerable cost on just developing the specification; however you have the advantage of having a specification that you can offer around several companies and get competitive prices for the development.
My preferred method is to work alongside you, and, or, your staff “doing the job” where possible, as this is the best way to develop the computer system to work in the most natural way, the most supportive way for you and your staff.
As you can see, some of these methods you can tackle yourself, or appoint a member of staff to take responsibility for.
The most important thing is to start thinking about what’s involved, make notes where you can, just by making one or two short notes every day eventually builds up into a considerable document which will be very useful for you or anyone tasked to computerise your business.
Monday, 4 February 2013
Locking a Subform
Locking a Subform
Instead of trying to lock the controls on the subform you can lock the "subform window" that the subform is displayed in.
LockUnlock SubForm Video on YouTube
Excel in Access (Part 3)
Excel in Access (Part 1)
Excel in Access (Part 2)
Excel in Access (Parts 1, 2 and 3 as Video Instructions)
How to use the Normalization Tool
Download a Demo Database and the Normalization Tool Here:
Using the normalization form we converted part of a spreadsheet type table into the beginnings of a relational table. From this table we derived a "look up table" now giving us a total of three tables, the remains of the first table, "tblStudent" (the student names), the next table "tblStudentSubject" stores the subject(s) related to each student, and finally a third table, "tblSubject" a "look-up table" to store the actual subject description.
From the table "tblStudentSubject" we created a form in datasheet view:
Now all we need do is combine this datasheet view form with a form based on the students list, and this will give us a form for correctly displaying the student names and the subject(S) the student is taking in one Form:
Using the wizard create a basic form from the student table and name it "frmStudent" arrange its size so it has some open space as shown.
Now open "frmStudent" in design view
And drag the subform "sfrmlStudentSubject" into the clear area on the student form "frmStudent"
You may wish to delete the text box, you don't have to but I usually find it looks better without it.
Size the form to suit
Now save the form and have a look, you will notice that it incorrectly shows all of the records in the subform,
Now the next bit is tricky, for two reasons, the form isn't really on top of the other form, it actually sits in a subform window and you need to gain access to the properties of this subform window by clicking on the tiny line that you can just see around your subform. This can be a difficult task to master first time.
Now open the "subform field linker" dialog box by clicking on the ellipsis (…)
Then select the fields which contain the data that link the two forms together, the master field will be the "Main Form" and the child field relates to the subform.
Notice how the master form ID and the subform ID(s) now match. You may wish to delete the ID field from the subform, it is not necessary for the maintenance of the link between the two forms.
You can download HERE, a database with the normalization form, --- --- and the tables and forms shown in this thread.
Excel in Access (Part 1)
Excel in Access (Part 2)
Excel in Access (Part 4)
Normalization Instructions
Download Demo db and Tool Here:
Phone: +44 1635 522233
Mobile: +44 7747 018875
Email: email@tonyhine.co.uk