Insert File

Insert File

There’s a fantastic, useful, clever feature of MS Access (actually I think it’s in all of the VBA products) where you can store code snippets in the normal file structure of Windows. Basically you have a folder which is accessed quickly and easily through the — >>>Insert >>>File — menu. This menu is shown when you are in the VBA interface. When you open it, you have access to this folder. You can have subfolders in any/all of those folders. You can have text files containing your code, Code Modules, Code Snippets, Class Modules Anything Textual you Want! Clicking on any of the text files automatically copies the contents of that text file straight into your Code/Class Module. But here’s the thing, you can also access any of those code snippets stored in the text files and edit them. You can simply and easily keep your stock of code available, ready and updated. And to top it all, it’s immediately available to any of your MS Access database projects.

"Insert File" - Demonstration

"Insert File" - Demonstration

Video 1 (Less than a Minute!)

Insert File Demonstration. In this video I show you how to quickly and easily insert a code snippet into your MS Access form Code Module using “file – Insert” menu option. In particular, I demonstrate inserting a “Custom Property” which, in this particular case is designed to hold an “Object Variable”…

Video 1 (0:38)

Nifty Access YouTube Thumb Nail

… …

Add to "Insert File"

Add to "Insert File"

Video 2 (Less than a Minute!)

In this 40 second video clip I demonstrate how easy it is to add and modify code in the “File Insert” section of “MS Access”… It’s one of the little used features of MS Access. It’s so helpful and can speed up your development process no end. If you are not currently using it I highly recommend you get conversant with it, start adding your favourite code snippets in there. I find the biggest problem is “Categorising my Code Snippets” I never know whether to categorise it by objects like, Form, Report, Module — or by what the code does! If you’ve got any ideas, then I’m all ears! 

I’ve also made a note of this Tip in the Nifty Tips section of my website…

Video 2 (0:40)

Nifty Access YouTube Thumb Nail

… …

More Useful Stuff HERE:-

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:-

Easily Apply Filters

Filtering - MS Access Forms

This video should be of interest to anyone who wants to easily apply filters to an MS Access form in datasheet view or continuous form view. In this demonstration I show how you can apply filters in a Form presented in Continuous view and also in Datasheet view. When you apply the filters, they are actually added to the forms properties. By opening the Forms property sheet you can view the filter you have just created. The filter appears as a text string added to the filter property of the Form. Once you are aware of this nifty little trick that MS Access automatically does for you, then you can leverage it by copying the text version of the filter and use it in VBA code! It’s not 100-percent straightforward, and I show you one Gotcha and the solution… The solution is to change the double quotes within the filter to single quotes. You can use this filter string created by MS Access in your VBA code. Calling the VBA code which sets the filter from the onClick event of the label above the column. With this information you now have the ability to level up your display to something nice and professional looking. Got to be good for your kudos in your company!

ApplyFilter to Sub-Form

ApplyFilter to Sub-Form

Video 1  (5:31)

You will find more information related to this video in this thread on Access World Forums (AWF) here:- ApplyFilter to subform

Video 1  (5:31)

Nifty Access YouTube Thumb Nail

… …

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.