PC Review


Reply
 
 
=?Utf-8?B?QnJ1Y2UgRC4=?=
Guest
Posts: n/a
 
      28th Feb 2006
I would like to do an export by the action transferspreadsheet. Is there a
way to add the current date to the export name. For example "work022806".
Thanks!!
--
Bruce DiPaola
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VGh1bmRlclN0b3Jt?=
Guest
Posts: n/a
 
      28th Feb 2006
Create a query and call it: work022806
Then create a command button, name it: export2xls
Make sure to use transferspreadsheet in the Caption under format in the
button property.

Create an OnClick event procedure use the bellow
Use this

Private Sub export2xls _Click()
On Error Resume Next
If Me.RecordsetClone.RecordCount > 0 Then
DoCmd.OutputTo acOutputQuery, " work022806", acFormatXLS
Else
MsgBox "No Record to Show, Cancelled Operation"
Cancel = -1
End If

End Sub

If there is no data, you will get the above message; otherwise you will get
an output of your report, select a location and save it.

Best of luck,

--
help to be helped, no one knows it all


"Bruce D." wrote:

> I would like to do an export by the action transferspreadsheet. Is there a
> way to add the current date to the export name. For example "work022806".
> Thanks!!
> --
> Bruce DiPaola

 
Reply With Quote
 
=?Utf-8?B?c2NoYXN0ZWVu?=
Guest
Posts: n/a
 
      28th Feb 2006
If you are going to do this daily, you could do
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9
"YourTable","C:\Work" & Format(Date(),"mmddyy")

Change the C: to the appropriate directory

"Bruce D." wrote:

> I would like to do an export by the action transferspreadsheet. Is there a
> way to add the current date to the export name. For example "work022806".
> Thanks!!
> --
> Bruce DiPaola

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create an export file using user generated title and export data t efandango Microsoft Access VBA Modules 6 5th Oct 2008 02:50 PM
Create an export file using user generated title and export data t efandango Microsoft Access External Data 6 5th Oct 2008 02:50 PM
Export of Calendar data as a delegate or public folders export Charles Root Microsoft Outlook Calendar 5 22nd Aug 2008 02:58 PM
Import Data / Edit Data / Export Data in Excel Mathias Fritsch Microsoft Excel Programming 0 19th Jul 2007 04:08 PM
set up custom form in outlook to export field data to access data. =?Utf-8?B?anppcGJhaXI=?= Microsoft Outlook Form Programming 1 1st Feb 2005 11:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:25 AM.