This data will then be exported by them on a weekly basis, emailed to me, and then i will import it into a central Access database, to create reports from it.
With Access, they can only export 65000 rows of data.
The application will use a query to export the data from on their side, and on my side it gets imported into a table.
Any suggestion on which data format is the best to migrate large number of rows data, between Access applications? It must also not get to big in size.
Should i use CSV or XML File format?
What export method would be the best to use?
I currently use the following code
Expand|Select|Wrap|Line Numbers
- Dim cDlg As New CommonDialogAPI 'Instantiate CommonDialog
- Dim lngFormHwnd As Long
- Dim lngAppInstance As Long
- Dim strInitDir As String
- Dim strFileFilter As String
- Dim lngResult As Long
- Dim strBaseName As String
- lngFormHwnd = Me.hwnd 'Form Handle
- lngAppInstance = Application.hWndAccessApp 'Application Handle
- strInitDir = CurrentProject.Path 'Initial Directory - [UD]
- 'Create any Filters here - [UD]
- strFileFilter = "Excel Files (*.xls)" & Chr(0) & "*.xls"
- lngResult = cDlg.SaveFileDialog(lngFormHwnd, _
- lngAppInstance, strInitDir, strFileFilter)
- If cDlg.GetStatus = True Then
- strBaseName = Split(cDlg.GetName, ".")(0)
- DoCmd.OutputTo acOutputQuery, "ExportCaptDataIG", acFormatXLS, cDlg.GetName
- MsgBox "All Data is now exported to the folder of your choice. This file can now be emailed or uploaded to the DOH", vbInformation, "Data imported"
- Else
- Exit Sub
- End If
Expand|Select|Wrap|Line Numbers
- Dim strPath As String
- With Me
- strPath = Left(.lblFile.Caption, InStrRev(.lblFile.Caption, "\"))
- strPath = FSBrowse(strStart:=strPath, _
- lngType:=msoFileDialogFilePicker, _
- strPattern:="MS Excel,*.xls")
- If strPath > "" Then
- .lblFile.Caption = strPath
- MsgBox "Please be patient. All Data is now imported into the program", vbInformation, "Data imported"
- Call DoCmd.SetWarnings(False)
- Call DoCmd.TransferSpreadsheet(acImport, acSpreadsheetTypeExcel9, "CaptDataImported", strPath, True, "")
- DoCmd.OpenQuery "DeleteCapData"
- DoCmd.OpenQuery "UpdateImportCaptInv"
- DoCmd.OpenQuery "UpdateImportCaptIG"
- Call DoCmd.SetWarnings(True)
- End If
- End With