![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Oct 2007
Posts: 8
Rep Power: 0
![]() |
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" Thanks End Sub Last edited by DaWei; Oct 19th, 2007 at 9:21 AM. Reason: Added code tags. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#3 | |
|
Newbie
Join Date: Oct 2007
Posts: 8
Rep Power: 0
![]() |
Re: VB using Access
Quote:
Thanx |
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Re: VB using Access
I don't know how you can expect help when you didn't even ask a question. Read the rules.
|
|
|
|
![]() |
| 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 |
| 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 |