/ Forside / Teknologi / Administrative / MS-Office / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
MS-Office
#NavnPoint
sion 18709
refi 14474
Klaudi 9389
Rosco40 5695
berpox 5456
dk 5398
webnoob 4919
Benjamin... 4870
o.v.n. 4637
10  EXTERMINA.. 4373
How do I save just data from an Access vba~
Fra : Joe Duncan


Dato : 27-12-01 20:34

I have a vba application in Access that tracks patient medication dosage
information and I need to be able to save the data only with out the
application to a floppy diskette for backup and for transfering the files to
another computer (the Application is 9 Mb the data is less than 200 kb). I
am concidering writing my own code to open the tables for selected patients
then writing the data to a comma delimited text file.

But, doesn't Access provide some sort of a way to do this with out my having
to write my own code? Any help is greatly appreciated.





 
 
Carsten Suurland (28-12-2001)
Kommentar
Fra : Carsten Suurland


Dato : 28-12-01 12:00

Hi Joe

I believe that you can do just that using a macro... (as an alternative to
VBA)
There are several commands that you can use, to export the results from a
table or query to an external file e.g. CSV or Excel.

I can't remember the exact commandname, but it should be fairly easy to
find, as there are only so many macrocommands to choose from.

Regards
Carsten Suurland



Mikkel Bundgaard (28-12-2001)
Kommentar
Fra : Mikkel Bundgaard


Dato : 28-12-01 12:12

"Joe Duncan" <duncanj@qwest.net> wrote in message
news:ZNKW7.215$WP5.107329@news.uswest.net...
> I have a vba application in Access that tracks patient medication
> dosage information and I need to be able to save the data only
> without the application to a floppy diskette for backup and for
> transfering the files to another computer (the Application is 9 Mb
> the data is less than 200 kb). I am concidering writing my own
> code to open the tables for selected patients then writing the data
> to a comma delimited text file.
>
> But, doesn't Access provide some sort of a way to do this with
> out my having to write my own code? Any help is greatly
> appreciated.
Hi Joe

The method TransferText can be used to export a table or query
to a comma delimited text file. TransferText corresponds to
choosing the export guide in the File-menu.

Public Sub exportTableAsText(strTable As String, _
strPath As String, bolHasFieldName As Boolean)

DoCmd.TransferText acExportDelim, , strTable, strPath _
, bolHasFieldName
End Sub

--
Mikkel Bundgaard
IT University of Copenhagen
http://officehelp.gone.dk
Codito, Ergo Sum



Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408848
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste