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