A
Andy
I've been able to (with some help!) get a button to function on a form to
prompt for a Dialog box for a file to import with set specification to a
table name.
I now want to do the opposite. Some script for a button to export a table
under a specification via a Save As Dialog Box.
http://www.mvps.org/access/api/api0001.htm was great for an import, but I'm
struggling with an import.
My import text ended up as:
Private Sub Command51_Click()
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, _
"CSV Files (*.csv)", "*.csv")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select the .csv file to Import...", _
Flags:=ahtOFN_HIDEREADONLY)
If Len(strInputFileName) > 0 Then
DoCmd.TransferText acImportDelim, "Trust Episode Upload", "Trust
Upload ", strInputFileName, False, ""
X = MsgBox("The File Upload Process is now complete. You may proceed
and process the Trust Data ready for audit", 64, "Clinical Coding Audit
Package")
End If
End Sub
prompt for a Dialog box for a file to import with set specification to a
table name.
I now want to do the opposite. Some script for a button to export a table
under a specification via a Save As Dialog Box.
http://www.mvps.org/access/api/api0001.htm was great for an import, but I'm
struggling with an import.
My import text ended up as:
Private Sub Command51_Click()
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, _
"CSV Files (*.csv)", "*.csv")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select the .csv file to Import...", _
Flags:=ahtOFN_HIDEREADONLY)
If Len(strInputFileName) > 0 Then
DoCmd.TransferText acImportDelim, "Trust Episode Upload", "Trust
Upload ", strInputFileName, False, ""
X = MsgBox("The File Upload Process is now complete. You may proceed
and process the Trust Data ready for audit", 64, "Clinical Coding Audit
Package")
End If
End Sub