Thread: Chapter 12
View Single Post
  #1 (permalink)  
Old March 1st, 2007, 05:15 PM
stingo stingo is offline
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?

Sub LoadRecords()

On Error GoTo HandleError

blnAddMode = False

Set rsProjects = objProjects.RetrieveProjects(blnAllRecords)

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

Exit Sub


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

Exit Sub

End Sub
Reply With Quote