T
ThriftyFinanceGirl
I have created a transfer spreadsheet procedure in which I used a saved
version of the transfer criteria (saved using the Access Wizard). I now need
to modify it, however when I go back into the wizard (to save new criteria)
the option to save the transfer specifics is not there anymore!
However, I would rather set all this in my code so that I can see the
specifics, thus making it easier to modify in the future. I can't find
anywhere in the MS Help what all the parameters are that you need to set to
do the TransferSpreadsheet command, any help on this? Here is my code below:
---------------------------------------------------------------
Public Function TaxExemptImport()
'Let's get the file name first....
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel files (*.XLS)", "*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select file to Import...", _
Flags:=ahtOFN_HIDEREADONLY)
'make sure that the user did not CANCEL the open dialog box
If strInputFileName = vbNullString Then
Exit Function
Else
DoCmd.SetWarnings False
Application.Echo False
'bring data into the holding table
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"TaxExemptImport", strInputFileName
Forms!frmtaxexempt!img1.Visible = True
Forms!frmtaxexempt!lbl1.Visible = True
Forms!frmtaxexempt.TimerInterval = 2000
Application.Echo True
version of the transfer criteria (saved using the Access Wizard). I now need
to modify it, however when I go back into the wizard (to save new criteria)
the option to save the transfer specifics is not there anymore!
However, I would rather set all this in my code so that I can see the
specifics, thus making it easier to modify in the future. I can't find
anywhere in the MS Help what all the parameters are that you need to set to
do the TransferSpreadsheet command, any help on this? Here is my code below:
---------------------------------------------------------------
Public Function TaxExemptImport()
'Let's get the file name first....
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel files (*.XLS)", "*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select file to Import...", _
Flags:=ahtOFN_HIDEREADONLY)
'make sure that the user did not CANCEL the open dialog box
If strInputFileName = vbNullString Then
Exit Function
Else
DoCmd.SetWarnings False
Application.Echo False
'bring data into the holding table
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"TaxExemptImport", strInputFileName
Forms!frmtaxexempt!img1.Visible = True
Forms!frmtaxexempt!lbl1.Visible = True
Forms!frmtaxexempt.TimerInterval = 2000
Application.Echo True