How to Dynamically Set the Report RecordSource in Microsoft Access

One of the steps for creating a report in Microsoft Access is to define where the data is coming from.  This is done through the report’s Record Source property which can be a table or standalone query in the database or a SQL statement as shown in the screenshot below.

Usually, this is defined when the report is created and only gets changed if needed.  In some cases, however, you might want to use the same report object for many different queries.  You could have a mailing list report that you want to use for employees, customers or other groups at different times and the data would be drawn from different tables or even different databases.

Continue reading

Coming in 2019 – CodeScholar Software Development Training!

CodeScholar Logo

CodeScholar is a new type of software development training specifically for educators and self-educators. Coming in 2019 from ComeauSoftware.com and OcalaITPros.com.

A simple Google search turns up hundreds of options for learning programming, many free, but where do you start?  There are many excellent reference sites and YouTube channels out there but many focus on the mechanics of a single language without explaining the broader concepts and best practices. Many are written by developers for (aspiring) developers and might leave you with a sink-or-swim feeling as you pick your way through incomplete answers and abandoned message threads that don’t quite apply.

As a programming instructor, I’ve spent the last couple of years searching the web for the best resources I could find for my students as they struggled to understand concepts such as database normalization and object-oriented programming.  A textbook or two and classroom lectures are not enough when you’re trying to reach a variety of students from different backgrounds.  Seemingly limitless online resources become very limited when it comes to information on a less popular topic such as pass-through queries or deadlocking and you’re trying to find something that will provide enough detail but won’t utterly confuse the students or cause then to tune out from boredom.

Continue reading

How To Create a Local WordPress site with XAMPP

XAMPP is one of many AMP software stacks (Apache – MySQL – PHP) that can be used to create a local web development environment for design and testing.  It automatically installs and configures Apache as a web server so that you can view your pages through http://localhost, MySQL as a database server for website data and PHP to render any PHP code within your pages.

Once you have XAMPP installed, you can install WordPress or other content management systems locally so that you can easily develop and test your web content and programming before uploading it to the web or an intranet.  I also use WordPress as a local CMS for organizing my own content.

Setting up XAMPP and WordPress takes as little as 10 minutes and can be done either on your hard drive or a USB flash drive as I show in this video. The flash drive option is a little slower but it is easily portable between systems as XAMPP runs entirely from the directory it’s installed to.

Downloads: XAMPP is developed by ApacheFriends and maintained by Bitnami. The download is available through SourceForge or from ApacheFriends.org: https://sourceforge.net/projects/xampp/ https://www.apachefriends.org/index.html

The latest version of WordPress is available from WordPress.org. https://wordpress.org/download/

 


What is Referential Integrity?

One of the fundamental differences between an Excel spreadsheet and a Microsoft Access or SQL Server database is the database’s ability to group data by subject into tables and create links between that information.  This type of organization enables the user to store large amounts of data and retrieve specific information quickly by writing queries that will search on the various fields. Referential Integrity is actually a simple but essential concept to understanding how databases like Access or SQL Server work.  Once you understand it, you will be able to use these tools to better organize and report on your data.

To demonstrate this concept, I’m going to use a few tables in a Microsoft Access database.  Access is a great environment to start learning about databases as it provides a user-friendly interface and is widely available through Office365.

Watch the companion video for this article on YouTube or continue article below …

Continue reading

On Success …

This is my latest Ice Breaker speech that I delivered to the Early Bird Ocala Toastmasters group on November 3, 2018.  Toastmasters is a great way to develop your public speaking and leadership skills and there’s probably at least one group in your local area.  Check out ToastMasters.org for more information on the club and where you can find it in your area.


What is success?

You can tell a lot about a person by how they answer that and whether they are actually trying to achieve their definition of success. Not everyone defines it personally for themselves.

Continue reading

Custom User Controls and Events in C#

One of the interesting features of C# is the ability to add custom user controls to your forms. If you have some specific functionality centered around a group of form controls that you use repeatedly, you can save it as a custom control in a class library and then add it to other applications. This is a great example of code reuse and saves a lot of time.

I’m starting to get the hang of creating demo videos with Camtasia and other tools and my latest videos show how to create user controls and implement them within Visual Studio.

Part 1:

Very often, you’ll want your custom controls to communicate with the host application, passing data back and forth and one way to do this is to have your control raise custom events at specific times.  The host application listens for these events and responds as it needs to.  This is a very powerful ability that enables your classes to interact in more dynamic ways.  Once you understand how to raise and catch custom events, you’re no longer dependent on the C# event model and your applications can signal and respond to any condition you want them to.

The second video builds on the first part to show how to add custom events to your classes.

I encourage you to follow along with the videos and try creating the controls yourself. Also, experiment with your own ideas so that you’ll better understand the concepts.

If you would like to read more about creating custom events in C#, you can find more detail on the Microsoft website at the following links:

How to Raise and Consume Events
https://docs.microsoft.com/en-us/dotnet/standard/events/how-to-raise-and-consume-events

Handling and Raising Events
https://docs.microsoft.com/en-us/dotnet/standard/events/index

 

Using JavaScript with ASP.NET

Why Use JavaScript?

There are a few technologies that you must be comfortable with if you want to do any serious web development. HTML for content, CSS for formatting and JavaScript for dynamic programming are recognized as the three foundation skills that any good web designer needs.

ASP.NET programmers might be tempted to do away with the last item given that .NET code can do virtually anything when combined with HTML and CSS but JavaScript is still very important and the reason lies in the different domains in which each language operates.

Continue reading

My Virtual Vacation and Free Stuff

Summer vacation has mercifully arrived for me and my students.  Unlike many teachers, I’m at the school through most of the Summer.  My students get three weeks off – I get one week followed by a couple weeks of what will essentially be teacher workdays.  Judging from the sympathetic looks I was getting from other staff members and the sudden, dramatic drop-off in attendance of my classes, I’m thinking the break didn’t come a moment too soon.

Continue reading

The Accidental Teacher

The following is the text from my speech to the Ocala Early Bird Toastmasters on May 19, 2018.  If you’re in Ocala and would like to learn more about leadership and public speaking, come join us for breakfast on Saturday mornings at The Egg and I.

My name is Andrew Comeau and I am … a public school teacher?

I say it that way because It’s been a study in irony for me. If you told me just a couple years ago that I’d be teaching a nighttime programming class for vocational students, I’d have laughed. When others suggested I should be a teacher, I said it wasn’t for me.

Then when I was told that a new programming course was needed in Ocala and I had the choice of designing and teaching it myself or hoping someone else did it well, I automatically said Yes.

Continue reading

Site Changes

Looking over my web presence earlier this year, I decided to do some consolidation. I had three sites – Drewslair.com, which has been in operation for 15 years, my business site, ComeauSoftware.com, which hasn’t changed much for quite awhile and the site for my networking group, OcalaITProfessionals.com, which needs a lot more attention and content.

Comeau Software Solutions is my consulting business which, in one way or another, is meant to encompass any technology-related business that I do from my work with clients to my various writing projects to some future projects I have ideas for.  I decided it was time to let it take its proper place and that means merging ComeauSoftware.com and Drewslair.com into one site.

I’ll be keeping the Drewslair.com domain for at least another year to maintain the many links that have been made to it over the years.  One of the things I like about modern web hosting is how domains and sites can be moved around pretty quickly with just a few changes in settings.

I’m thinking about some changes to the look and feel of the site but all the content will remain and I hope to provide a lot more great articles and posts in the coming year.