Microsoft® Access® 2010 VBA Programming Inside Out

Errata for Microsoft® Access® 2010 VBA Programming Inside Out

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page XXVIII
Errata & Support

Link http://go.microsoft.com/FWLink/?LinkId=223727 leads to http://examples.oreilly.com/9780735659872-files/ But there is no link from the oreilly pages to the Submit Errata page which I am using now.

Note from the Author or Editor:
Yes I can confirm that the link does not take you to anywhere with a link to register errata.

Mayo Marriott  Dec 12, 2011  Oct 12, 2012
Other Digital Version
I
Kindle has no page #s, Book Location = 15095

The "Inside Out" that is after Fig. 18-2. CurserLocation has Default setting and alternative setting the same "adUseServer". Is this correct? Please excuse the lack of correct page number, just wanted to submit my question w/o being given an error message. Thanks.

Note from the Author or Editor:
Page 662 INSIDE OUT Ine text which describes the CursorLocation make the following change :- "...the alternative setting is adUseServer..." should read "...the alternative setting is adUseClient..."

Anonymous  Jun 06, 2012  Oct 12, 2012
Printed
Page 000
Accompanying code

There is no trap in the cmdPick_Click() sub in the form class module for frmListBoxMultipleSelections2 if no item is selected. IsNull(Me.lstProducts) Then MsgBox "No product selected": Exit Sub added as first line of the sub would be neater. By default no item is selected in the products list so error is fairly inevitable for the click happy user. The reverse routine of deselecting from the selected products list seems OK. I would personally prefer an explicit test of an item being selected rather than reliance on replacement of an empty string with an empty string in the rowsource for the combo.

Note from the Author or Editor:
On Page 291, after the comment add the following line of code (note this all needs to be on a single line) If IsNull(Me.lstProducts) Then MsgBox "No product selected": Exit Sub The code will then look as follows :- Private Sub cmdPick_Click() ' add current item to selected list If IsNull(Me.lstProducts) Then MsgBox "No product selected": Exit Sub

johnbirt  Jul 24, 2012  Oct 12, 2012
Printed, Safari Books Online
Page Section 2.4.6
for loop in code section

syntax error the procedure, sub mod_Loop_FOR() is missing the next statement in the for loop. It is present in the code sample for the book, but missing on the page.

Note from the Author or Editor:
On Page 81 at the bottom the the code section at the bottom of the page it reades :- If lngCount > lngMaxRecords Then Exit For End If rst.MoveNext End If This should read as :- If lngCount > lngMaxRecords Then Exit For End If rst.MoveNext Next End If Before the End If there is a missing Next statement.

Terry Silveus  Sep 19, 2012  Oct 12, 2012
Printed, Safari Books Online
Page Section 3.3
SQL and Embedded Quotes

The comment is incorrect - "replace an embedded single quote with two single quotes" is repeated for the section of code that should be commented "use double quotes as delimiters"

Note from the Author or Editor:
Page 99 in the sample code. The following comment occurs twice :- ' replace an embedded single quote with two single quotes The second time it occurs it is wrong and should be replaced with :- ' use double quotes as delimiters

Terry Silveus  Sep 20, 2012  Oct 12, 2012
Printed
Page 28
Figure 1-43

Accompanying text on page 28 and in figure 1-43 reference an intentional error that is supposed to be included in the companion code. The intentional error in fact does not exist in the companion code. The intentional error was supposed to be: If lngPosSpace <>0 The accompanying code contains the correct code: if lngPosSpace = 0 As a result, the reader is unable to duplicate the results in the book.

Note from the Author or Editor:
The required correction has been made to the sample download database (no correction is required in the book). The revised file to download is located at http://www.upsizing.co.uk/VBAInsideOut.aspx.

Tom Fulmer  Sep 16, 2011 
Printed
Page 28
3rd paragraph

The page refers to the downloaded database, and anticipates that the code will not work. In the example db the code DOES have the "=" and not the "<>" as described in the book result >>> I got even more confused Simon

Note from the Author or Editor:
Hi Simon, My apologies, it looks like the current download is missing a corrected file, which includes the line lngPosSpace <> 0 rather than the corrected code which reads lngPosSpace = 0. I will get the download updated for this. Many thanks for bringing this to my attention. Regards Andy Couch

simon fenna  Sep 10, 2012 
Printed, Other Digital Version
Page 46
First paragraph

It's not clear how the code in the paragraph would operate (no code to establish which version of Access was running) or how the compiler directive # would change the logic flow versus the same code without the compiler directive. The example might be more useful if it included code to identify the Access version before the compiler directive code; e.g. calling something like: Public Function AccessVersionID() As String Select Case SysCmd(acSysCmdAccessVer) Case 7: AccessVersionID = "95" Case 8: AccessVersionID = "97" Case 9: AccessVersionID = "2000" Case 10: AccessVersionID = "2002" Case 11: AccessVersionID = "2003" Case 12: AccessVersionID = "2007" Case 13: AccessVersionID = "Pirated!" Case 14: AccessVersionID = "2010" Case Else: AccessVersionID = "Unknown" End Select End Function 'AccessVersionID()

Note from the Author or Editor:
This would be a low priority, but we could add in the text that "In this example you would manualy set the constant Pre2007Version to True or False". This would be inserted after the code shown on page 46, and just before the next topic "References" The proposed example by the reader is a nice idea, but it will not work because compiler constants can not be functions, variables or anything other than a constant.

Bob Schilling  Jan 13, 2012  Oct 12, 2012
Printed, PDF
Page 46
1st paragraph - code example

In the code example on page 46, the the compiler directive constant "Pre2007Version" is declared and initalized to "False" in the first code statement; however, it appears that the "rst" object variable is subsequently initialized to a DAO.Recordset2 object if the "Pre2007Version" constant is true, otherwise "rst" is intiialized to a DAO.Recordset object. Assuming that the implication is that the "Pre2007Version" constant declaration statement would first be modified to be intialized to "True" for a version that was released PREvious to the 2007 Verision, and considering that the DAO.Recordset2 object is not available in versions PREvious to Access 2007, isn't the logic in the directive "#IF...#ELSE" block actually a reversal of the intended logic (or is my mental process falling victim to some sort of "perception of set" fallacy?)

Note from the Author or Editor:
The following code lines on page 46 should be changed :- Existing #If Pre2007Version Then Dim rst As DAO.Recordset2 #Else Dim rst As DAO.Recordset #End If This should be changed to #If Pre2007Version Then Dim rst As DAO.Recordset #Else Dim rst As DAO.Recordset2 #End If

Anonymous  Jan 27, 2012  Oct 12, 2012
Printed, PDF, Safari Books Online
Page 189
Top half

In the modRST_TableRecordset() code, the With rst sections have rst.Seek statements. Shouldn't the rst be omitted ? Also, top quarter of p. 190, the With rst section has an rst.MoveNext statement.

Note from the Author or Editor:
This error occurs on the following pages and relates to program code:- In each case the prefix for example rst in rst.Seek needs to be removed to read .Seek (watch that you leave in the full stop .Seek as the full stop is very important). On page 189 Incorrect code on two lines:- rst.Seek "=", 9 rst.Seek "=", "Thomas", "Axen" Corrected Code: .Seek "=", 9 .Seek "=", "Thomas", "Axen" On top of page 190 Incorrect code is rst.MoveNext Correct code is .MoveNext On Page 192, near the bottom of the page in the INSIDE-OUT. Incorrect code is rst.MoveNext Correct code is .MoveNext On page 212 near the bottom of the page Incorrect code is bk = rst2.Bookmark Correct code is bk = .Bookmark

Robert Lundquist  Sep 19, 2011  Oct 12, 2012
Printed
Page 478
2

A really picky typo, but the first comment in the code reads "Global varaibles" and should of course be "Global variables" (!)

Note from the Author or Editor:
The 8th line down on page 478 reads as follows ' Global varaibles Change this to ' Global variables

Duncan  Mar 02, 2013 
Safari Books Online
2617
Function modProc_VerySimpleByRef

in the kindle book and in the code the word refernce is spelt incorrectly Function modProc_VerySimpleByRef(ByRef lngFirst As Long, _ ByRef lngSecond As Long) As Long ' the ByRef, says pass a refernce to the parameter

Note from the Author or Editor:
At the top of Page 72, in the first line the word "refernce" should be spelt as "reference"

Ian Bennett  Jul 25, 2012  Oct 12, 2012