Microsoft Access 2002 Visual Basic for Applications Step by Step Comments and Corrections (314760)



The information in this article applies to:

  • MSPRESS Microsoft Access 2002 Visual Basic For Applications Step By Step ISBN 0-7356-1358-3

This article was previously published under Q314760

SUMMARY

This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Microsoft Access 2002 Visual Basic for Applications Step by Step, ISBN 0-7356-1358-3.

The following topics are covered:

  • Page 159: Error In Step 10 Code Sample
  • Page 170: Extra Double Quote Marks Given In Code Sample

MORE INFORMATION

Page 159: Error In Step 10 Code Sample

The Step 10 code sample on page 159 contains an error.

Change:
rst.FindFirst "SubscriberID = " " & List0
				
To:
rst.FindFirst "SubscriberID = " & List0
				

Page 170: Extra Double Quote Marks Given In Code Sample

In the code sample on page 170, there are additional double quote marks shown for all 3 strFilter lines, the 2 strReportName lines, and the DoCmd.Close acForm line.

Change:
Case 1		' Journal mailing - - all current subscribers.
	strFilter ="  "PaidThrough >= Date()"
Case 2		' Subscriptions expiring within 3 months.
	strFilter ="  "PaidThrough >= Date() And PaidThrough < Date() + 90"
Case 3		' Subscriptions that expired in past 3 months.
	strFilter ="  "PaidThrough < Date() And PaidThrough > Date() - 90"
End Select

' Determine which mailing labels user wants.
If LabelType = 1 Then
	strReportName ="  "SmalMailingLabels"
Else
	strReportName="  "BigMailingLabels"
End If

DoCmd.OpenReport strReportName, acViewNormal, , strFilter
DoCmd.Close acForm, " "MailingLabelIsDialog"

To:
Case 1		' Journal mailing - - all current subscribers.
	strFilter ="PaidThrough >= Date()"
Case 2		' Subscriptions expiring within 3 months.
	strFilter ="PaidThrough >= Date() And PaidThrough < Date() + 90"
Case 3		' Subscriptions that expired in past 3 months.
	strFilter ="PaidThrough < Date() And PaidThrough > Date() - 90"
End Select

' Determine which mailing labels user wants.
If LabelType = 1 Then
	strReportName ="SmalMailingLabels"
Else
	strReportName="BigMailingLabels"
End If

DoCmd.OpenReport strReportName, acViewNormal, , strFilter
DoCmd.Close acForm, "MailingLabelIsDialog"


Modification Type:MinorLast Reviewed:12/4/2002
Keywords:kbdocerr kbdocfix kbinfo KB314760