Bring Latest Code To Top

Bring Latest Code to the Top

Often, you will want to add some Custom Functionality to your MS Access Form by creating a Command Button. Once you have created the Command Button you will more than likely add some code to the onClick event of the command button.

You would do this by opening the property sheet and finding the Button “on click event”, press on the ellipsis and this will automatically generate a code stub in the Code Module behind the Form, ready for your custom code. If your Code Module already has lots of code in it, then the button onClick event could be created anywhere in the code list.

Luckily the cursor will be flashing at the code stub and give you an indication of where You need to enter your custom code. However because of the seemingly random placement of the Code Stub by MS Access, you may have difficulty finding the stub subsequently.

A good practice to get into is to copy the Code Stub to the top of your form, place it under the declarations and properties (if you have them). Now you will be able to find it easily when you come back to this Form…

Bring Latest Code to the Top

Bring Latest Code to the Top

Video 1 (09:26)

In this video I demonstrate a a very simple but very useful technique. All you do is bring the latest code you are working on in a form or a module to the top, just below the declarations. Now when you return to your project a few days, weeks or month’s later, you automatically know the last piece of code you were working on… Sort of like my favourite subject “Self Documenting Code”

Video 1 (09:26)

Nifty Access YouTube Thumb Nail

… …

More Useful Stuff HERE:-

Display a Message for the User

Display a Message for the User

There are many ingenious ways to offer help to your MS Access Application user. In a help table in a Text Box. There is a YouTube video by way of explanation here, and a downloadable example database.

Display Message inside TextBox

Display a Message for the User

Video 1 (1:24)

An excellent space saving tip here from Mark. You can display instructions for the user actually inside a text box. There’s a downloadable sample Microsoft Access Database available on the Access World Forums website. Follow the Link Provided…

Video 1 (1:24)

Nifty Access YouTube Thumb Nail

Links:-

… …

Help System For MS Access

Help System For MS Access

Video 1 (3:25)

Here is a run through of the Help System in operation. the “Nifty Access Help System” uses an MS Access Table, an MS Access Form and utilises the “Nifty CallCalled Class Module” to extract information from the Calling Form.

This is one of the simplest ways is to store the help information in the table. But it’s not so simple because every place that you want to provide help, you will have to add the code to open the help form, and also provide the individual ID reference to the help record associated with the control/place on your form that your user will benefit from some help. It’s a nightmare to run a help system like this, and if you have several forms, switching back and to, to the table to find out which is the next available help ID number, well it gets a bit tiresome. However this here is an easy solution to the problem.

Video 1 (3:25)

Nifty Access YouTube Thumb Nail

Links:-

… …

More Useful Stuff HERE:-

Rank with VBA

Rank with VBA

With the Google presentation and a video below, I demonstrate how to change the rank of an item in a table. This is particularly useful if you have a lookup table and you want to offer your user the ability to move an item up or down the list. To add this feature you need to add a new field which stores a value you can change. Sort the list ascending so that the preferred option selected by the user comes to the top. See the presentation and video together for further information.

I developed this code for the Nifty Switchboard Builder. The page data is controlled by an index which prevents duplicate values. This causes a problem when you want to move one of the switchboard page rows up or down. Let’s say you want to move record number 5 to record number 4, you can’t because you can’t change 5 to 4 because this will trigger the duplication prevention provided by the unique index. The solution is to move it to a row number not within the set of row numbers. You could invent an arbitrary figure saying 1000, however you must be sure that this 1000 will not be used by some other process.

Rank with VBA

Rank with VBA

Video 1 (7:06)

This 1st video follows along from the presentation below. The presentation goes over the basic idea, then the video goes into details about how to construct the queries required to effect the ranking. In this video I show the next step, which is to create the queries which move people up and down in a list with VBA… In the second video of (not published yet) I will show how to convert the queries into SQL string and run them with VBA.

Video 1 (7:06)

Nifty Access YouTube Thumb Nail

Presentation as PDF Here:-

… …

More Useful Stuff HERE:-

This website uses third-party software - WordPress Add-Ins to be exact. I don't know what any individual add-in does, but I'm sure that many of them collect information about you. So be aware, if you continue using this site, then you are likely to be sharing your information. I don't know how to disable this sharing for any, or all of the plugins for individual users. So I can't stop the sharing of information. If this worries you then please do not use this site... If you continue to use this site I will assume that you are happy with it.

Do you need a hand in the right direction?

You are in the right place.