text file extension - transfer text

datacontrol

Registered User.
Local time
Today, 03:56
Joined
Jul 16, 2003
Messages
142
I am making use of code that I found here to manipulate the windows open/save as dialog. So, with that in mind, the user is being prompted to select a file from the network, and when they do a new form opens with this code behind my "import file button":

Private Sub ReadDoc_Click()
Dim FileName As String
Dim Response As Integer
Dim Home As String

'
' Check Dialog Box values
'
If (Nz(Me.FileName, "x") = "x") Then
Response = MsgBox("You must specify an input file.")
Exit Sub

End If

DoCmd.TransferText acImportDelim, "cirrcn_20040113123431 Import Specification", "after", Me.FileName, False, ""
DoCmd.Close
DoCmd.OpenForm "after import confirmation"

End Sub
__________________________

I am using the transfer text method, where my file extension is actually *.report. This file is actually a comma delimeted file, and if I just change the extension to *.txt manually, it imports fine.

When I try to import the *.report file I get an error because access does not recognize the file extension although the data in the file is formatted correctly. Is there any way I can get Access to recognize .report files as text?

Thanks a million in advance!!!
 
No...but you can use vba to rename or copy the "yourfile.report" into "yourfile.txt" Check the help files for the Name Statement and the FileCopy Statement.
 
registry

Is there any way I could change the registry to include *.report files? I have already attempted to do this with no luck. Is iteven possible to get the Jet engine to recognize *.report files?
 

Users who are viewing this thread

Back
Top Bottom