Monday, 28 November 2016
Checklist Sample dB How to Check ALL
5 - Adding a Checklist to MS Access
4 - Adding a Checklist to MS Access
3 - Adding a Checklist to MS Access
2 - Adding a Checklist to MS Access
1 - Adding a Checklist to MS Access
0 - Adding a Checklist to MS Access
Saturday, 26 November 2016
Generate Multiple PDF Report with different Criteria 3
Generate Multiple Copies of a Report (PDF Invoices) with different Criteria 2
Generate Multiple Copies of a Report (PDF Invoices) with different Criteria 1
MS Access - Generating Multiple Reports (PDF Invoices)
Thursday, 9 October 2014
Automatically add a Checklist to MS Access
This YouTube playlist shows how to add a single checklist to your MS Access DB. There is a good description how the code works.
YouTube video here:-
Automatically add a Checklist to MS Access: http://www.youtube.com/playlist?list=PLhf4YcS5AjdqzkQ5egOuO1myweo6hNgG2
Leszynski's on line book shows how to add User Level Security
Years ago I was fortunate to stumble across this online book "Access 97 Expert Solutions" by Stan Leszynski, famous for the "Leszynski naming Convention" used by many MS Access Developers.
On this Page about halfway down you will find a section titled:- Setting Custom Properties Using Property Let and the code (A custom property) :-
Public Property Let prpFormMode(rstrMode As String) ' Purpose: Set the form mode when the form opens ' Arguments: rstrMode:=Form mode: Add/AddEdit/Browse/Edit ' Pseudocode: ' 1. Check the form mode argument for validity ' 2. Enable/disable buttons and features depending on argument ' 3. Set the custom property equal to the argument Code is HERE:- Listing 12.6 shows the Property Let function for the prpFormMode property. If you note the interesting line - under pseudocode (line 2) ' 2. Enable/disable buttons and features depending on argument This is exactly what you want if you need to provide user level security in your forms. You place the custom property in the top of your form and you use it in a similar way to a function, by calling it and passing in as a parameter a text string which describes the layout and use that you want the form to offer the user. Let's say your options were "Admin" or "Data Entry". The parameter is fed into a case statement, in the case statement you can hide, disable, enable, change combobox rowsources, run functions, set the controls default value, anything basically you want to do to make the form "appear as" and do whatever you wish.
Excel to Access (A)
Thursday, 6 March 2014
Allow a Combo Box to Return when NOT Selected
I have reproduced some slides taken from a presentation. This first one is a picture of the working form. Most people get to the stage of adding three combo boxes or more, the combo boxes control the selection appearing in the subform, however they have a problem when a combo boxes left empty, instead of the expected result of returning all available options for that combo box, none are returned.
You may notice in the Picture below that the combo boxes display the word: ALL This is added by using a union query, union queries are not available from the MS Access query designer grid, you have to write them manually.
.
..
The Picture below is of the same form in design view, the left hand combo box property sheet has been opened showing the combo box row source displayed in the zoom window. Notice it is basically a select query with the addition of the word "distinctrow" and the final part which begins union select.
.
..
Below is the combo box row source (incorrectly marked as recordsource in the pictures below)
.
..
In this picture below you can see the parts which have been added to a basic select query, "distinct row" just make sure the query only returns one item, where the table may have several items that are the same name. And below, the "union query" which adds a Star "*" to the left hand column of the query results and the text"" to the right hand column of the query results. However the combo box only displays "" because although the first column is present in the combo box it is hidden by the combo box settings.
.
..
The picture below just shows a basic select statement, it's not used in the example it's here to show you what the union query is based on.
.
..
The picture below shows the query designer grid for the query "qryMup" there's only enough room to show the criteria for the first to columns, but the third column would be very similar to the first two if it was displayed. You may notice that this criteria contains a function.
.
..
Below is the full criteria of the first combo box, notice the function "fCboSearch"
.
..
Below is the full SQL of the query "qryMup"
.
..
The picture below is of the function "fCboSearch" basically what happens is the combo box result is passed in as the variable "vCboSearch" and processed. This function is designed to detect if the combo box is empty, in which my case it may contain a Null value or it may contain what is termed a zero length string "". If it contains either of those then they are replaced with the "*" which instructs the query to return all the results for that combobox election.
.
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.