Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 26th, 2004, 05:52 AM
Friend of Wrox
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default Linked table issue


I have a db which needs to use the exported report from a 3rd party application in a query. Every time the 3rd party application runs the report it exports a file to the root of c:, but unfortunately this doc is named .doc even though it is a csv. So, when I try to link to it, it kicks me out, as soon as I rename to .csv it is fine.

It is not practical to rename the file locally, as this file is also used by other applications too. So, does anyone know if there is a way or a setting to allow .doc to be a source for a linked table and if so, how do I do it?

Cheers all...
Reply With Quote
  #2 (permalink)  
Old November 26th, 2004, 12:46 PM
Friend of Wrox
Join Date: Jun 2003
Location: Norwich, Norfolk, United Kingdom.
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts

Does this help:

Public Sub ImportText()
  DoCmd.TransferText acImportDelim, , "TestQuery", "e:\My Documents\textforimport.doc"

End Sub

Best wishes,

Clive Astley
Reply With Quote
  #3 (permalink)  
Old November 26th, 2004, 01:28 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts


   Your best bet is to confirm the existence of the file first, and then copy with the csv extension.

   This works in vbscript:

Dim objFSO
Dim boolExists

Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")

If IsObject(objFSO) Then
    boolExists = objFSO.FileExists("C:\Test.doc") 'returns -1 if file exists
End If

If boolExists = -1 Then
    objFSO.CopyFile "C:\Test.doc", "C:\Test.csv"
End If

Of course once again I can't get it to work in VBA.

I hope this gets you started.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-Only Linked Table pjm Access 6 August 21st, 2006 07:42 AM
Can a Make Table Query produce a Linked table? kronik Access 5 May 16th, 2006 06:17 AM
Linked Table sdilucca Access 1 February 24th, 2006 07:29 AM
linked table Tasha Access VBA 1 August 6th, 2004 03:04 PM
Help! Detect if linked table is available giswim Access VBA 2 October 3rd, 2003 06:39 PM

All times are GMT -4. The time now is 04:28 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.