Use an Access database to generate an instance method of reporting data and reading data:
Example:
The following are the referenced contents: Sub Mwrite () On Error GoTo Thiserr Dim rs as New ADODB. Recordset Rs. Open "DLMD", CurrentProject.Connection, adOpenDynamic, adLockOptimistic, actable Rs. Save "A:\DLMD.ADTG", ADPERSISTADTG Rs. Close Set rs = Nothing Thisexit: Exit Sub Thiserr: MsgBox Err.Description Resume Thisexit End Sub Sub Mread () On Error GoTo Merr Dim I as Integer Dim Rsde as New ADODB. Recordset Dim Rsso as New ADODB. Recordset Rsso.open "A:\DLMD.ADTG", "Provider=mspersist" Rsde.open "DLMD", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, actable Do Until rsso.eof Rsde.addnew For i = 0 to Rsso.fields.count-1 Rsde.fields (i) = Rsso.fields (Rsde.fields (i). Name) Next I Rsde.update Rsso.movenext Loop Rsso.close Rsde.close Set Rsso = Nothing Set Rsde = Nothing Mexit: Exit Sub Merr: MsgBox Err.Description Resume Mexit End Sub |