Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Access 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2003 VBA Programmer's Reference by Patricia Cardoza, Teresa Hennig, Graham Seach, Armen Stein; ISBN: 9780764559037
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2003 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 29th, 2007, 04:07 AM
Registered User
 
Join Date: Nov 2007
Location: , , Botswana.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 11 Pg 334 Running Balance

Hi

I have tried to use the Code as given on Page 332 for the running balance in rpts.
The expression On Open you entered as the event property setting produced the following error User defined type not defined

code as I have typed
Option Compare Database
Option Explicit

'Create a variable to hold the running balance.
Dim mdblBalance As Double

Private Function GetStartingBalance()
'Get Starting Balance
GetStartingBalance = -900000.25
End Function
Private Sub Report_Open(Cancel As integer)
' Initalize the running balance to previous balance
mdblBalance = GetStartingBalance
'Set Starting Balance
txtBalance_Starting = mdblBalance
End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'Increase the balance by the current transaction amount
mdblBalance = mdblBalance + txtAmount
'Set the balance to the new balance
txtBalance = mdblBalance
End Sub

Private Sub ReportFooter_Print(Cancel As integer, PrintCount As Integer)
'Set the ending Balance to the final balance amount
txtBalance_Ending = mdblBalance
End Sub


I have managed to find the errors in the code as given in the book.
I have corrected the code and it works beautifully.
If anyone wants the code message me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8 pg 282 Step 11 workib BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 May 26th, 2008 04:19 PM
chapter 11 figure 11-7 relative positioning pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 November 29th, 2007 06:11 AM
chapter 5, pg 154 spizotfl BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 3 May 1st, 2007 03:08 PM



All times are GMT -4. The time now is 11:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.