![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Oct 2007
Posts: 8
Rep Power: 0
![]() |
Access
Ive created a macro that should import/export a file based of certain criteria's: filename and filedate.
\\c\desktop\"johndoe" & Right("0" & Month(Date()), 2) & Right("0" & Day(Date()), 2) & Right(Year(Date()), 2) & ".txt when i insert the code into the field "filename" using the action "TransferText" i receive the following errors: microsoft access cant parse the expression or filename has to end in .txt or .csv. can someone inform me as to whats wrong with the code? Thanks |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Re: Access
Lets switch to VBA Macros again because they're easier to debug. I pulled your code from your previous post:
Option Compare Database Option Explicit Public Sub Import() Dim Joe As Date Dim John As String Dim result As String Jon = Format(Date, "MMDDYY") DoCmd.TransferText acImportDelim, "3RPV EXPORT", "Johndoe*.txt", "johndoe*.TXT" fileDt = Format(Date, "MMDDYY") fileNm = "C:\Desktop\" & "johndoe" & fileDt & ".txt" MsgBox (fileNm) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| put method, main and member access specifiers separately | cairo | C++ | 9 | Jul 5th, 2007 11:28 PM |
| ADSI Changing Password - Access Denied | bobfox | Visual Basic .NET | 1 | Sep 22nd, 2005 1:22 PM |
| How to connect with VB to an Access database on another computer | iown714 | Visual Basic | 5 | Aug 4th, 2005 10:23 AM |
| Module Access | Cipher | Visual Basic | 9 | Apr 6th, 2005 4:23 PM |