Home Case Studies MS Office Tips and Tricks Sample Code Helpful Videos Custom Development  Custom Training Join Us Contact Us
Search Our Site:  

Use Functions In Your Access Reports

Access reports have a number of built-in functions you can use to customize your reports. Place a textbox in your report page footer and get rid of the label if one is created for you. To get the current date and time that the report was printed,  type =Now(). Whenever you see two reports of the same type, you can immediately see which is the most current by checking the page footers.

Access also includes common expressions like Page X or Y and, for workgroup security enabled databases (ones that you have to log into), it can provide the Current User. With that information, you can see not only when the report was created, but who ran it.

Of even greater use than the built-in functions are custom functions written in VBA. These functions are written in the Visual Basic for Applications language and stored in the section of the database called Modules.

Are You Ready For Office 365?


Office 365 is

  • Email and calendaring powered by Microsoft Exchange
  • Office Web Apps - the office productivity apps you already know, tailored for the web
  • Websites powered by Microsoft SharePoint both for internal-facing intranet and customer-facing website
  • Instant Messaging and Online Meetings powered by Microsoft Lync
  • All with a financially-backed 99.9% uptime guarantee

Sign up for a free trial:

Name
Company
Email Address

Your information will not be shared with any other party. You must provide a valid email in order to recieve your login information and starting information kit.

Watch this video  to see how Office 365 can help your business.

Even if you’re not a VBA programmer, you can create simple functions for use in your Access reports. A function is created by going to Modules in the Objects bar and clicking New.

You’ll find yourself in the Visual Basic Editor. Don’t freak out! You can get back to Access at any time. Let’s try a simple function that returns our current confidentiality statement (legal language is always changing!) Type the text below (or copy and paste it) into the VB Editor:

Public Function ConfStat() As String
ConfStat = "I Get It! Development Confidential. You may not publish or reproduce."
End Function


This creates a function called ConfStat. Not much of a program, but the nice thing is that you can include a reference to this function in the Page Footer of all of your confidential Access reports by typing =ConfStat().

If (when) your confidentiality statement language changes you can update the function in the VB Editor and all of your reports will update at the same time.

 You can find more samples of VBA code in our Sample Code section.
 
Please share your comments on this article!

 
Name (opt)
Email Address (opt)
Your Questions/
Comments

I Get It! Development does not share your email address or other information, nor do we add you to any mailing lists unless you specifically request to be added by checking the box below.



SEE ALSO
You may also find the following articles useful:

Spreadsheet vs. Database

Bound vs Unbound Forms

Subqueries In Access

Excel - Access Import Problems

Columns In Access

SQL In Access

Spreadsheet View (Access)

SQL Cross Join In Access

Access To Excel And Back

Ssheets vs Dbase Round 2

Control Your Data!

Compact/Repair In Access

Parameter Queries

Dropdown Box Tips In Access

Access Text Box Troubles

References

Journal of Accountancy Articles

Tweaking The Numbers

Block That Spreadsheet Error

Excel Security Issues


 

Clients

Do you need help with Microsoft Office? Contact us

See how we've helped companies like yours develop effective business processes

Client Success Stories


 

Consultants

I Get It! Consultants set their own hours, work with their own clients, and choose their own projects.

If you're a Microsoft Office guru and would like to explore being a full-time consultant, please see our consultant information pages.