[mso] Re: Access/Excel :VSMail mx4

Glenda,

I'll try to answer as many of your questions as I can here.

First in order to get the date to be put in automatically, you will need to
add variables to your function for it.  The variable strDate will add the
date to your exported file name.  

Next, why are you multiplying everything by 1? The error you are getting is
because you are dealing with a non-numeric field which will not allow
numeric operations on it.

As far as automating this process you can create a macro that does nothing
but (RunCode) and calls this function.  Then name it autoexec.  It will run
when the database is opened.  Then just set up a scheduled task to open the
database at the appropriate time and you are completely automated.      If
you need to go into the database to make other changes, you can hold down
the shift key while you open it in order to bypass the autoexec macro.

If you want to export using specs, you can do that for text files but I have
never tried it for anything else.

Function ExportMe()

    Dim strDate as String
    strDate = Cstr(Datepart("m", Date())) & Cstr(Datepart("dd", Date())) &
str(Datepart("yyyy", Date()))

    DoCmd.SetWarnings False
    DoCmd.OpenQuery "QueryName", acViewNormal, acEdit
    DoCmd.SetWarnings True

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"TableMadeByQueryName", "c:\path\sub path\DestinationExcelName" & strDate &
".xls"

End Function

If you need any other help with this just holler.

James La Borde
South Western Federal Credit Union




-----Original Message-----
From: Glenda Wells [mailto:gwells@xxxxxxxxxxx]
Sent: Tuesday, October 19, 2004 7:35 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access/Excel :VSMail mx4


One more...

I also need to automate the export of a text file that uses
specifications. can that be automated as well?  /g

-----Original Message-----
From: Cathy.Evans@xxxxxxxxx [mailto:Cathy.Evans@xxxxxxxxx]
Sent: Tuesday, October 19, 2004 10:04 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access/Excel


Earlier this year (March Archives) Jim Pettit helped me with the same,
only
I was exporting a table.   This code makes my table and exports to
certain
location on project server.  He said the TransferSpreadsheet only works
on tables.

    DoCmd.SetWarnings False
    DoCmd.OpenQuery "QueryName", acViewNormal, acEdit
    DoCmd.SetWarnings True

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"TableMadeByQueryName", "c:\path\sub path\DestinationExcelName.xls"


=20

                      "Glenda Wells"

                      <gwells@xxxxxxxxxxx      To: <mso@xxxxxxxxxxxxx>

                      >

                      Sent by:                 cc:

                      mso-bounce@freelist

                      s.org                    Subject:  [mso]
Access/Excel                          =20
                      10/19/2004 09:27 AM

                      Please respond to
.....
                      mso

=20

=20





Hi Gurus.
...been so busy can't see straight but lurking about when I get a
chance.

I run a macro in an Access DB to extract data, after which I export a
query to a network shared space as an Excel worksheet.

Would y'all please gimme clues on automating this process?

thanks. /glenda








------------------------------------------------------------------------
-----------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain proprietary, business-confidential
and/or privileged material.
If you are not the intended recipient of this message you are hereby
notified that any use, review, retransmission, dissemination,
distribution, reproduction or any action taken in reliance upon this
message is prohibited. If you received this in error, please contact the
sender and delete the material from any computer.  Any views expressed
in this message are those of the individual sender and may not
necessarily reflect the views of the company.
------------------------------------------------------------------------
-------------------------------

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx
or MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the
quotes) in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will
also allow you to change your email settings to digest or vacation (no
mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group,
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an
invitation with instructions.  Once you are a member of the files group,
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************



  _____ =20

<< ella for Spam Control >> has removed 13007 Spam messages and set
aside 0 Newsletters for me
You can use it too - and it's FREE!  www.ellaforspam.com=09
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes)
in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorized.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: