p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Access 2003 VBA (http://p2p.wrox.com/forumdisplay.php?f=150)
-   -   Chapter 12 (http://p2p.wrox.com/showthread.php?t=54774)

stingo March 1st, 2007 05:15 PM

Chapter 12
 
In the following code, the LoadRecords sub from Chapter 12 appears to be populating the combo boxes, then populating the projects object with values from the recordset. It then moves to the record pointer to the first record in the recordset and populates the projects object from that record. This seems to be redundant or am I missing something?

Code:

Sub LoadRecords()

On Error GoTo HandleError

blnAddMode = False

Set rsProjects = objProjects.RetrieveProjects(blnAllRecords)

If rsProjects.BOF And rsProjects.EOF Then
    Exit Sub
Else
    Call PopulateComboBoxes
    objProjects.PopulatePropertiesFromRecordset rsProjects
    Call MoveToFirstRecord(intCurrProjectRecord, rsProjects, objProjects, blnAddMode)

    Call PopulateProjectsControls
End If

Exit Sub

HandleError:

GeneralErrorHandler Err.Number, Err.Description, PROJECTS_FORM, "LoadRecords"

Exit Sub

End Sub



All times are GMT -4. The time now is 04:37 PM.

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