Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 19th, 2007, 8:37 AM   #1
u2cannv
Newbie
 
Join Date: Oct 2007
Posts: 8
Rep Power: 0 u2cannv is an unknown quantity at this point
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

Last edited by DaWei; Oct 19th, 2007 at 9:21 AM. Reason: Added code tags.
u2cannv is offline   Reply With Quote
Old Oct 19th, 2007, 9:22 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: VB using Access

Have a look at the rules, and the "How to Post a Question" thread.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 19th, 2007, 10:08 AM   #3
u2cannv
Newbie
 
Join Date: Oct 2007
Posts: 8
Rep Power: 0 u2cannv is an unknown quantity at this point
Re: VB using Access

Quote:
Originally Posted by DaWei View Post
Have a look at the rules, and the "How to Post a Question" thread.
so basically you cant help me,
Thanx
u2cannv is offline   Reply With Quote
Old Oct 19th, 2007, 10:23 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: VB using Access

"Won't" is the word.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 19th, 2007, 11:25 AM   #5
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
Re: VB using Access

I don't know how you can expect help when you didn't even ask a question. Read the rules.
OpenLoop is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 2002 -> VB 2008 conversion pal Visual Basic .NET 1 Sep 15th, 2007 3:43 AM
Creating an Access Database programmatically... Carl Visual Basic .NET 2 Jun 4th, 2006 6:12 AM
2 Threads access a method in the same time. myName C# 19 Jan 16th, 2006 12:57 PM
How to connect with VB to an Access database on another computer iown714 Visual Basic 5 Aug 4th, 2005 10:23 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:56 AM.

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