datacontrol
Registered User.
- Local time
- Today, 22:18
- 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!!!
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!!!