Channel Button

There are 2 articles on this title. You are reading the article ranked and rated #2 by Helium's members.

Computers & Technology   >

Computers & Technology (Other)

Get a Widget for this title

How to create a custom function in Microsoft Access

MS Access/VBA Tips:

I remember when I first started coding. We would type out the code in a text-type editor, then cross our fingers during compilation - hoping nothing would go wrong! Luckily - MS Access gives code writers hints and selection options. Once in the module section - underneath the Option Compare Database header, you could try out a few of my favorites:

Type in: docmd.
You need to actually type in the period after docmd and wait a few seconds at most. Some selection options will appear and you can use the down arrow to preview them. These are options that are also available in the Macro section of the database.

In order to declare a variable - you use the word DIM and specify the name and variable type. For example - type in:
DIM MyDate as
Give Access a second or two to bring up the dropdown list and select date from the list provided.

Documentation of code is so important. To put comments in the code so you can remember what you've done and why you did it, just put an apostrophe at the beginning of each line of comment. Once you press enter, Access will turn the code a different color - normally green.

Learn more about this author, Linda J Banks.
Contact this writer Click here to send this author comments or questions.


Below are the top articles rated and ranked by Helium members on:

How to create a custom function in Microsoft Access

  • 1 of 2

    by Gail Wynand

    In general a top down approach should be followed especially when creating a function.

    Start with a module, if need be create

    read more

  • 2 of 2

    by Linda J Banks

    MS Access/VBA Tips:

    I remember when I first started coding. We would type out the code in a text-type editor, then cross our

    read more

Add your voice

Know something about How to create a custom function in Microsoft Access?
We want to hear your view. Write_penWrite now!

87017

Featured Partner

Pacific Research Institute (PRI)

The mission of the Pacific Research Institute (PRI) is to champion freedom, opportunity and personal responsibility f...more

What is Helium? | Buy Web Content | Contact Us | Privacy | User agreement | DMCA | User Tools | Help | Community | Helium’s Official Blog | Link to Helium

Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA