A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

switchboards



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2005, 06:04 PM
ssddteam
external usenet poster
 
Posts: n/a
Default switchboards

I have a query called roster. I want to be able to hit a button and it opens
the query in excell
  #2  
Old August 22nd, 2005, 11:18 AM
JohnFol
external usenet poster
 
Posts: n/a
Default

Make a reference to the Excel Opbect Library and try something like this. .
..

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"QueryName", "c:\FileName", True

Dim oApp As Excel.Application

Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
oApp.Workbooks.Open ("c:\filename.xls")

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub



"ssddteam" wrote in message
...
I have a query called roster. I want to be able to hit a button and it
opens
the query in excell



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
access switchboards MLC in Miami Running & Setting Up Queries 2 April 11th, 2005 06:22 PM
My switchboards won't work with WinXP ! Jeff Conrad Using Forms 4 February 25th, 2005 08:51 PM
Access Switchboards trace-ste Using Forms 2 November 23rd, 2004 04:42 PM
Switchboards Judy Database Design 1 September 21st, 2004 09:41 PM
Switchboards Lin Light Database Design 4 May 15th, 2004 08:37 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.