Link to home
Start Free TrialLog in
Avatar of Thirt
Thirt

asked on

Need to speed up unbound Form Load - use DAO?

I have a split database and the backend is staying in Access. I heard that in this enviroment, DAO is the faster method to load an unbound form? If so, is there a better process to load up a forms unbound field values then what I'm doing?

My goal is to enhance the current Continuouis Form that I provide to date. The field columns span across and off the page. Plus I need to record the changes and send the new update to a change log table. So I need a new form to edit all the fields in one form for the selected record, allow changes to be cancelled at any time (thus my fear to use a bound form), and when they press OK it saves the changes in the main table and sends the updated record to the change log table.

Is there a better way to do approach this?
Private Sub Form_Open(Cancel As Integer)
 
Dim rs As DAO.Recordset
 
Set rs = CurrentDb.OpenRecordset("SELECT TblFileList.* FROM TblFileList WHERE TblFileList.FileIndexNo=1571")
rs.MoveFirst
Do Until rs.EOF
     
     Me.FileIndexNo = rs!FileIndexNo
     Me.FileCurrentDate = rs!FileCurrentDate
     Me.cboCat = rs!FileCatCode
     Me.cboFileName_ver = rs!FileName_ver
     Me.FileDocID = rs!FileDocID
     Me.txtTitleOnDoc = rs!FileDocTitle
     Me.txtLink = rs!FileLink
     Me.FileName_orginal = rs!FileName_orginal
     Me.FileRevisedby = rs!FileDocName_short
     Me.FileRelativeDate = rs!FileRelativeDate
     Me.FileFunction = rs!FileFunction
     Me.FileJob = rs!FileJob
     Me.FileDocCode = rs!FileDocCode
     Me.FileDocSubCode = rs!FileDocSubCode
     Me.FileDocSubMicroCode = rs!FileDocSubMicroCode
     Me.FilePUOID = rs!FilePUOID
     
 
FileErr:
rs.MoveNext
Loop
rs.Close
End Sub

Open in new window

Avatar of Thirt
Thirt

ASKER

oh, and the current method I'm using appears to take about 3 seconds to load, which is slower then I expected.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial