599CD.com New Access Seminar: Web Data   Collapse Menus
 
 
NEW Access Seminar - Use Access with the Web! dismiss
 
   
 

What's New?  |  Courses  |  Theater  |  Demo  |  Tips  |  Blog  |  Forums  |  Search  |  Help  |  Order

 
 
 
Courses - Microsoft Access 304
Description: Advanced Access
Running Time: 82 minutes
Pre-Requisites: Access 303 very strongly recommended
Versions:
We use Access XP in this course, but the lessons are valid for all versions of Access from 95 to 2003. There are cosmetic changes in Access 2007. Order before 7/8/2009 to get a FREE upgrade to our 2007 version when released!
 
Microsoft Access 304
Advanced Access Development

Printable Invoice or Quotation, AfterUpdate Event, OnCurrent Event, Sorting & Grouping Levels, Can Grow/Shrink, More. 82 Minutes
 

AC304 Major Topics

  • Printable Quote or Invoice
  • AfterUpdate Event
  • OnCurrent Event
  • Sorting & Grouping Levels
  • Force New Page After Section
  • Dynamically Change Label Text
  • Image Stretch, Zoom, Clip
  • CanGrow, CanShrink Properties
  • Print a Single Invoice

Access 304 continues our advanced Access database development with VBA programming. We continue work on our sales and order-entry system. This lesson will focus on creating a printable report.

We don't need a separate table and form to create a quotation versus an invoice. They're both essentially the same thing - except one the customer is expected to pay for. So let's add a field to tell the two apart.

 

Next we'll add a toggle button to our order form so we can switch between quote and invoice, but with a twist. Let's use an AfterUpdate Event to change the caption of the button from "quote" to "invoice" and change the color when its value changes.

 

We'll also learn how to manually work with the numbered colors that Access has in the control properties.

 

Next you'll learn about the OnCurrent Event - an event that runs when you move from record to record, and how you can use it to control your own events.

 

Now the button color/caption will change when you move between orders too... not just when you click on the toggle button.

Next we're going to work on our printable invoice report. First, I'm going to make one big master query that has all of the information in it that I'm going to need: orders, order details, customer info, employee info (sales rep), etc.

 

This will make one big monster report with everything in it.

 

Now don't worry, we'll make sense of all of this madness. We're going to learn how to create Sorting & Grouping Levels to break up this information.

 

We'll create an Order Grouping Level to keep all of the "order" information together at the top of the invoice - then all of the line item details can go in the detail section.

 

Next we'll arrange all of the controls in our Detail section.

 

We want a new page after each invoice so that a customer doesn't get a piece of someone else's invoice... so we'll learn about the Force New Page After Section property. We'll also see how to adjust page margins for that "perfect" fit.

 

Next we'll add a label to the report so that it can say "Invoice" or "Quotation" depending on which type this order is. Of course, we'll add code to the Build Event of the section to change it accordingly.

 

Notice now when I generate a bunch of orders, the label will change depending on which type each is:

 

We'll add our logo to the top of the invoice.

 

Next we'll make a nice big PAID logo that will only show up if the Invoice is Paid. Oh, and I'll talk about why it's necessary to sometimes hide fields or checkboxes on your reports if you need their values.

 

We will then talk about the Can Grow and Can Shrink properties of both text boxes and sections. This allows your report items to take up as much (or as little) space as they need... and eliminates unnecessary whitespace.

 

Next we'll make a button to print an invoice. Unfortunately you can't print just a single invoice unless you know the special VBA code to open a report and show a single record.

 

Access 304 Outline
 

1. Quotation or Invoice
Is this a quote or an invoice?
IsQuote field
Add Browse All Orders button
AfterUpdate Event
Event when a field is updated
Change button color and caption
Access numbered color codes

2. On Current Event
Event when user moves between records
Add IsQuote to Order List
Filter By Selection
Add sum of orders to order list footer

3. Printable Invoice, Part 1
Create a Master Invoice Query
InvoiceQ
Sorting & Grouping Levels
Keep all Order information together
Group By OrderID

4. Printable Invoice, Part 2
Arrange controls in Detail section
Force New Page After Section property
Invoice Footer Totals

5. Printable Invoice, Part 3
File > Page Setup > Margins
Resize invoice layout
Quote or Invoice Label
Dynamically change label in Build Event
Create page header
Add company logo to top of invoice
Stretch, Zoom, and Clip modes for graphics

6. Printable Invoice, Part 4
IsPaid Label
Hiding fields on a report
Can Grow, Can Shrink Properties
Create a Print Button on the Order Form
Printing just a single invoice

 

 


Try a FREE Demo Lesson

 
 

Huge Discounts Available
When you purchase multiple classes together
Huge savings up to 50% off! Order Now.
 

Student Interaction: Microsoft Access 304

Richard on 1/1/2007:  Creating a printable quote / invoice. Changing properties with VB code, OnCurrent, CanGrow/Shrink, OpenReport
leroy diaz on 3/11/2008: I was wondering you made a invoice for all the orders but what if you wanted to show all paid orders in an invoice and unpaid with the grand total in the footer how would you do that? i think you should put this in a lesson.
Richard Rost on 3/13/2008: That's coming up in the next class. In Access 305 we make the Accounts Receivable report. Now if you want to take that data and stick it in the footer of the customer's invoice, you could DLOOKUP (Access 302) the total unpaid orders and stick it in there, or use a subreport (something I haven't shown you yet because I don't like to use them - they're like subforms only very messy).
Walter Pohle on 5/26/2008: On invoice report is there any way to Shrink and Grow city,state & zip so that they are closer together time stamp 5:27 on 304 vide 6
Richard Rost on 6/13/2008: Walter, I believe I cover this in a subsequent lesson. You just need to combine them together into one field using simple STRING CONCATENATION. I do it in a query, but you can do it right in the report: CityStateZIP: City & ", " & State & " " & ZIP
 
 

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

 

 

Need
Help?

   
Do you have questions about Word, Excel, Access, Web Design, or computers in general? Just ask us anything you'd like.
 

Get Free Tips & Tricks
 

Join our mailing list today and get information on our Free Tips & Tricks Newsletter including free video tutorials, eBooks, live seminars, and more.

Email:
Name:
Type in the word to the left:
 
Your email will be kept 100% safe and will never be given to 3rd parties.
 


CLICK HERE for a FREE lesson



Order your first 599CD course now.
Your Satisfaction is Guaranteed!


Subscribe to our RSS FeedWhat's This?

Subscribe to RSS Feed  Add to Live Bookmarks  Add to My AOL  Add to MyYahoo  Add to Google Reader or Homepage    hide  help  

599CD Home   |   Learn More   |   What's New?   |   Contact Us   |   Free Demo   |   FAQs   |   Order Now   |   Become an Affiliate   |   TechHelp   |   MYOLP   |   Jobs   |   Chat   |   Downloads   |   Handbooks  (Text)   |    Mailing List   |   Lost Passwords   |   Referral Program   |   Online Poll   |   Troubleshooter   |   Corporate / Educational / Government / Non-Profit Sales   |   Message Forums   |   Testimonials   |   Privacy Policy   |   Tips & Tricks

 
 

What's New  |  Home  |  Courses  |  Demo  |  Learn More  |  Contact  |  Order