Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   VB using Access (http://www.programmingforums.org/showthread.php?t=14185)

u2cannv Oct 19th, 2007 9:37 AM

VB using Access
 
ok I need some serious help, for anyone that knows Access. I'm trying to automate a process using a macro that will import/export a file by the file name and date. EX: johndoe101907.txt. how can i do this? i'm using a macro action called transfertext and here's my code:
\\c\desktop\"johndoe" & Right("0" & Month(Date()), 2) & Right("0" & Day(Date()), 2) & Right(Year(Date()), 2) & ".txt"

this gives an error of file must contain .txt at the end.
so i tried to code it using vb and heres my code for it:
:

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"

again any help would be appreciated, I know that something here is wrong, but don't know what.
Thanks

End Sub

DaWei Oct 19th, 2007 10:22 AM

Re: VB using Access
 
Have a look at the rules, and the "How to Post a Question" thread.

u2cannv Oct 19th, 2007 11:08 AM

Re: VB using Access
 
Quote:

Originally Posted by DaWei (Post 135320)
Have a look at the rules, and the "How to Post a Question" thread.

so basically you cant help me,
Thanx

DaWei Oct 19th, 2007 11:23 AM

Re: VB using Access
 
"Won't" is the word.

OpenLoop Oct 19th, 2007 12:25 PM

Re: VB using Access
 
I don't know how you can expect help when you didn't even ask a question. Read the rules.


All times are GMT -5. The time now is 3:33 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC