473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

exporting access data to excel for calculations and reporting

I need to export data from access to an excel database [logon and
logoff times] to calculate times and wages for the week but the code
that I entered doesn't seem to like either me or the database!
I need it to go to one specific sheet in an excel workbook - the code
used is following as was advised earlier - but I am having no luck and
I want to get this database working asap.
code is:

Option Compare Database
Public Function TransferSpreadsheet()
Sub SendToExcel()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"tblLogTimes", "C:\Documents and Settings\Office\My
Documents\Employeetimesheets.xls", True
Application.FollowHyperlink "C:\Documents and Settings\Office\My
Documents\Employeetimesheets.xls"

End Sub
End Function

I have used the following macro to initiate the module
OpenModule
TransferSpreadsheet [export s/s to excel 8-10, tblname, has field
names]
StopMacro

this is not working - what have i done wrong?

Nov 13 '05 #1
1 1937
Am Wed, 07 Sep 2005 20:52:33 -0700 schrieb michb:
I need to export data from access to an excel database [logon and
logoff times] to calculate times and wages for the week but the code
that I entered doesn't seem to like either me or the database!
I need it to go to one specific sheet in an excel workbook - the code
used is following as was advised earlier - but I am having no luck and
I want to get this database working asap.
code is:

Option Compare Database
Public Function TransferSpreadsheet()
Sub SendToExcel()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"tblLogTimes", "C:\Documents and Settings\Office\My
Documents\Employeetimesheets.xls", True
Application.FollowHyperlink "C:\Documents and Settings\Office\My
Documents\Employeetimesheets.xls"

End Sub
End Function

I have used the following macro to initiate the module
OpenModule
TransferSpreadsheet [export s/s to excel 8-10, tblname, has field
names]
StopMacro

this is not working - what have i done wrong?


Hello,

maybe the following things make trouble to your module/macro
- I think you should be careful with a sub in a function
- The name of the sub is also the name of a makro.
- you should use a makro that runs a funktion (RunFunction)
"AusführenFunktion" in the German Version)
- The macro "TransferSpreadsheet" is the same as Docmd.TransferSpreadsheet.

HTH
Karpi
<fluctuat nec mergitur>

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Amber | last post by:
I found a sample on dynamic reporting to a datagrid and exporting to excel. For those who are into reporting into Excel. This web tool allows for adhoc select statements and reports. ...
3
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works...
4
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear"...
2
by: G | last post by:
When I export data from access to excel by with "export" or "Analyze with" I seem to loose parts of some fields (long text strings). Is there a way to export it all to excel? Thanks G
18
by: Andre Laplume via AccessMonster.com | last post by:
I have inherited a bunch of dbs which are are shared among a small group in my dept. We typically use the dbs to write queries to extract data, usually dumping it into Excel. Most dbs originated...
5
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
3
by: Nashwa24 | last post by:
Hi all, I'm a newbie in Access and really need help. I need to do some calculations on data stored in a database's table. Previously I used to store the data in an excel sheet and run a visual...
3
by: jennwilson | last post by:
Access 2000 - I have developed a database that houses patient information. The patient information must be sent in an excel file to another company department. I know how to export my data to Excel...
3
by: hawaiijeff | last post by:
I have a report that I built in Access 2002. I built it with the report wizard, but then went into design mode and added a extra information which was calculations off the existing fields in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.