Access 2010
Access 2003
Seminars
Tips & Tricks
Access Forum
Course Index Insider Circle
 
Tutorials   News   Tips   Forums   Help   Logon   Order  
 
 
 
Courses - Microsoft Access 204
Description: Intermediate Microsoft Access 4
Running Time: 65 minutes
Pre-Requisites: Access 203 very strongly recommended
Previous Lesson: Access 203
Next Lesson: Access 205
Main Topics: Letter Writer, Macro Basics, On Double Click Event, Refresh Macro, Report Formatting
Versions: This course is valid for Access 2000 through 2003. If you are using Access 2007 or 2010, you will still benefit from this course. You will find that the concepts are the same, but there are cosmetic differences between the versions.

    

Order before 5/20/2012 to get a FREE upgrade to our Access 2010 version!
Click here for details

 
Microsoft Access 204
Intermediate Access 4

Designing a Letter Writer, Access Macros, Events, OnDblClick Event, Refresh Macro, Much More. 65 Minutes.
 

AC204 Major Topics

  • Letter Writer
  • Macro Basics
  • On Double Click Event
  • Refresh Macro
  • Report Formatting

In this class we will begin designing our Letter Writer system. With our letter writer, we'll be able to actually type letters and other correspondence into our contact management system and print them out in a letter or memo format to mail or fax to our customers.

 

We'll begin by developing a query that only shows the current contact record. We'll use this query to feed our report that lets us print out the letter. We'll use the technique we learned in a previous class to get the Contact ID value from the open contact form.

 

Now that we have the query built, we can build the Contact Letter Report. We'll format this report to look like a normal letter, with the customer's name and address and the body of the letter ready to mail.

 

Next we'll place a Print As Letter button on our form so that we can print the letter right up.

 

We'll learn about what it means when records are Dirty - or in the process of being edited, and how this hurts our database... we can't directly print a letter now until we manually save the data to the table. We'll need something more powerful.

 

In lesson three, we'll begin to learn about Macros. We'll make a couple of real simple macros just to teach you how they work - and how we can make them repeat automated tasks. We'll make a simple macro just to beep at you.

 

Then we'll make a macro that's a little more complicated. It will open a form, beep, open a table, and then tell you "I'm done now, Master!"

 

Next, we'll make a macro that will allow us to open up the current customer record from the contact form. We will assign this macro to the On Dbl Click event (on double-click) in our customer combo box. This means the user just has to double-click on the combo box to open up that customer. Real powerful stuff!

 

Now that we've learned about macros, we can actually make a macro to refresh the current contact record before printing it - assuring us that the data is saved in the table before printing. We'll learn how to make a command button that runs a macro.

 

Once we're done with the macros, we'll actually get into making our letter report look good. We'll start by making some new fields to concatenate our name fields and address fields together.

 

We'll learn how to automatically adjust the vertical spacing of fields on our forms and reports.

 

We'll talk about the margins of the page, and making sure you set the report at it's optimal width.

 

We'll put the company logo and our return address in the page header...

 

This class begins to take our contact management system and use it for correspondence as well. We'll do more with this in coming classes - including a mass-mailing form and letter as well. We also begin to learn about Macros, which are the stepping stone to Visual Basic programming. Don't miss this course!

 

Access 204 Outline
 
0. Introduction

1. Contact Letter Query
Build a query that shows only the current contact
Getting the ContactID from the form into our query

2. Contact Letter Report
Designing our Contact Letter Report
Placing the Print As Letter button
Dirty records - data needs to be saved

3. Macro Basics
Constructing basic macros
Beep macro action
OpenForm macro action
OpenTable macro action
MsgBox macro action
On Dbl Click event
OpenForm WHERE condition

4. Refresh Macro
RunCommand, Refresh macro action
OpenReport macro action
Creating a new button using the macro

5. Formatting the Letter
Creating new name and address fields
String concatenation in a new text box
Formatting as a long date
Format > Vertical Spacing > Increase
Report width, page width, margins
Placing a logo in the page header
Making a multi-line label
 


Try a FREE Demo Lesson

 
 
 

Student Interaction: Microsoft Access 204

Richard on 1/1/2007:  Designing a Letter Writer, Access Macros, Events, OnDblClick Event, Refresh Macro, Much More. 65 Minutes.
sasson cohen on 4/13/2008: do we have an index/list for reviewing each theme on each class ( maybe to support our design )?
Richard Rost on 4/16/2008: Sasson, you can find a searchable index of all of my Access classes at www.599cd.com/Access/Index
Margaret  Cattarin on 9/3/2008: Richard,
I have tried everything that I can think of to stop decimals from rounding out to whole integers. Is there hidden code somewhere?

Richard Rost on 9/8/2008: Margaret, that all depends on what you're doing. I need more information to go on. What type of FIELD are you working with? Number? If so, did you format it as an INTEGER or LONG INTEGER? If so, that's your problem.
 Elsa on 10/27/2008: Hi Richard, How do I format only a few words within a concatenation in a report textbox? Example: "Your balance is:" & "[Balance]" I want [Balance] to be in bold and formatted to ##,###.00 while the rest of the concatenation stays the same.
Richard Rost on 10/27/2008: Use the FORMAT function. Here are some examples:

="Your balance is " & Format(Balance,"##,###.00")
="Your birthday is " & Format(DOB, "mm/dd/yy")
="You owe " & Format(Balance, Currency)

I cover this in Access 311

Elsa on 10/28/2008: Hi Richard,
Thank you for your help. I am currently at 223 but will keep going.

Elsa on 11/18/2008: Hi Richard,
Does MS Access 2003 and earlier have the functionality to bold a portion of a concatenated string in a report textbox?

Richard Rost on 11/23/2008: Elsa, nope. You can't change the format of PART of a textbox string.
Greg Paradise on 2/18/2009: I'm using 2000 version and the Refresh from the run command will not run, I get an error that says this version does not support the function. Do I need to have my cd in?
 Rick on 8/13/2010: Hi Richard

I have been doing the Access course with you at 599cd which is helpful. I have a question.

I have a table that I have imported from an excell sheet. Only 2 fields. (Stock code and Suppliers part number.
The data came in well but I have duplicates which I want to sort out. (there are a lot of records in this table.) and generally only one or two duplicates for each entry, if any,
Some are a 100% duplicate (eg stock code and Suppliers pat number) and others have the same stock code but no suppliers part number. I want to keep the record with the most amount of information, Eg both stockcode and suppliers part number. Eventually I want to make a new table out of the sort.
I was thinking of using a query or a macro but not sure how to go about it. Can you point me in the best way to do it? Thanks Richard.

Robert Fitzgibbons on 2/8/2011: I cannot open http://www.599cd.com/access/204. I get the "page cannot be found error meaasge". Any suggestions?

Reply from Richard Rost:

Robert, is that a link in the video? If so, and you're looking for the student databases, they've been moved here.

Robert on 2/23/2011: I have written a query which sorts my database according to appointment time. But the report I have developed based on this query sorts differently which is very annoying. I can’t seem to tell the report how do sort properly. Any advice?

Reply from Richard Rost:

A report will override (or sometimes ignore) your query's sort. You have to use a SORTING AND GROUPING LEVEL in your report to force the sort you want. That's covered in Access 104.

 Frank on 8/18/2011: Access 204 video 1

What is the reason for adding the default value in the customerID combo box?

 Alyson on 3/21/2012: Hi. I'm using Access 2010 and when I click to create a report, it pulls up tables automatically...not queries...the only way I've found to use a query to feed a report is if I click the query and use the report wizard. Is there a way around this?

 Alyson on 3/21/2012: Sorry for so many questions...I built my query and report like you did...now when I go to the query, it won't show my information...it looks like a blank page, but when I go to design view, it's all there...what is going on?
Alyson on 3/22/2012: Ok, to say my problem correctly (lol) I built my query and then a form from the query. When I change from design mode to form view, it appears as a blank page, but when I go back to design view of the form, everything is there. I can't move on from this point due to this problem. I hope it makes more sense this time :) Please help!
 

You may want to read these articles from the 599CD News:

 

 
Learn
 
Microsoft Access
Microsoft Excel
Microsoft Word
Microsoft Windows
Microsoft PowerPoint
Adobe Photoshop
Visual Basic
Active Server Pages
Online Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
WalkThru Tutorials
Free Upgrades
Insider Circle
Info
 
Latest News
New Releases
User Forums
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Help
 
Live Chat
Customer Support
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Live Chat
General Contact Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Try Us
 
Free Lessons
Online Theater
Mailing List
Course Indexes:   Microsoft Access   Microsoft Excel   Microsoft Word   Microsoft PowerPoint   Visual Basic (VB)   Photoshop   Active Server Pages (ASP)  
Keyword Search Cloud:   What's This?   courses   microsoft access tutorials   vlookup   access   cartesian   excel   dlookup   vba   attendance   access 2007   sql   windows 7   combo box   pivot table   visual basic   test   iif   word   calendar   query   conditional formatting   pivot tables   photoshop   hlookup   access 101   excel 202   excel 2007   student attendance   update query   my account   word 2007   append query   quickbooks   queries   dsum   reports   powerpoint   if   microsoft access   dmax   mail merge   relationships   ms access   access 2010   vb   dcount   subforms   excel 2003   handbooks   html   599cd   combobox   if function   security   microsoft word   after update  
Copyright 2012 by 599CD.com, All Rights Reserved