|
-
Oct 31st, 2000, 04:16 PM
#1
Thread Starter
PowerPoster
Hi,
I'm trying (without much success) to use Access's TransferText method from a VB6 program. Does anyone have any ideas?
Thanks!
-
Nov 1st, 2000, 08:16 AM
#2
Thread Starter
PowerPoster
Help!
I could really do with some assistance guys and girls!
-
Nov 1st, 2000, 08:59 AM
#3
Fanatic Member
TransferText
OK. Back on the case. What are you tring to do? Any code that doesn't work?
Give me a bit more to work on here... I may be good, but I am not that good :-)
Cheers,
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 1st, 2000, 09:44 AM
#4
Fanatic Member
..
The following example exports the data from the Access table 'Chrisjk' to the delimited text file Chrisjk.doc using specification Standard Output:
DoCmd.TransferText acExportDelim, "Standard Output", _
"Chrisjk", "C:\Txtfiles\Chrisjk.doc"
Help in Access (in that area) is pretty good...
Don't neglect the help files...
-
Nov 1st, 2000, 12:07 PM
#5
Thread Starter
PowerPoster
Yeah...but...
Thanks guys but I meant getting the transfertext method to execute from a VB program. I know you have to replace the DoCmd with something but i don't know what and I don't know what to declare it as.
For example I know you need to declare a database variable (e.g. Dim db as Database) and then connect to it, but then how do I get it to run the transfertext method?
Thanks!
[Edited by chrisjk on 11-01-2000 at 12:16 PM]
-
Nov 1st, 2000, 10:00 PM
#6
PowerPoster
I use this to export to dbase 4
This may or may not get you on your way...
Dim Myaccess As Access.Application
Set Myaccess = CreateObject("Access.Application")
With Myaccess
.Visible = False
.OpenCurrentDatabase (TimeDatabase)
' Try to replace this area for text files
.DoCmd.TransferDatabase acExport, "dbaseIV", "c:\osmsys\data\rarch", , "DATATABLE", "OUTSOURCE.dbf"
.Quit
End With
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Nov 2nd, 2000, 08:14 AM
#7
Thread Starter
PowerPoster
Thanks! I eventually got it to work like this...
Dim Myaccess As Access.Application
Set Myaccess = CreateObject("Access.Application")
With Myaccess
.Visible = False
.OpenCurrentDatabase "Cool.mdb"
.DoCmd.TransferText acExportDelim, , lstExport, txtName
.Quit
End With
Trouble is...it asks for the database password which I would rather hard code..any ideas where I can put it?
-
Nov 2nd, 2000, 02:13 PM
#8
Thread Starter
PowerPoster
AAAAAAAAAAAHHHHHHHH can anybody help?!?! (please read previous post in this topic)
thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|