Access to Excel Report

neerjakhattar

New member
Local time
Today, 14:23
Joined
Dec 6, 2010
Messages
6
I have a form from which you can filter and after filtering I know how to show access report but I do not know how to show the result on excel report please help i am very confused in making excel report on just one button click.
 
If you have used a MACRO to view the report you can add a OutPut command to take the query results into Excel.

So look at the MACRO section in your database then select Actions (make sure all the actions have been selected), look at the list and select OutPutTo and follow the steps, click help if needed.
 
If you have used a MACRO to view the report you can add a OutPut command to take the query results into Excel.

So look at the MACRO section in your database then select Actions (make sure all the actions have been selected), look at the list and select OutPutTo and follow the steps, click help if needed.


I do not have a direct query.I am buliding a query based on the filtering criteria 's from the form that i provided. so when i pass that query or that string it gives me query not found

i used this

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, StrSq, "filename.xls

this also wants a direct query not one the form
 
OK so your data is filtered in the subform then?

What you can do is use a goto into the subform then select all the records and copy them then open Excel and paste in. See sample code here, here will also need to set the Reference to Use Excel in the VBA Screen. Tools Menu then Reference and Microsoft Excel XX Object Library.

Me.frmCombinedSearchEngineFilter.SetFocus
DoCmd.GoToControl "Policy Ref"
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
Dim xlapp As Excel.Application
Set xlapp = CreateObject("Excel.Application")
With xlapp
.Workbooks.Add
.ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
False
.Cells.Select
.Range("J:N").NumberFormat = "0"
.Cells.EntireColumn.AutoFit
.Columns("I:I").Select
.Selection.Delete Shift:=xlToLeft
.Visible = True
.Range("a1").Select

End With
 
Yes I started like this only.I think it is working.I have taken that libraray and opened the recordset and did some excel formating.

It is working but still i have to check with my manager what exactly he wants

but thanks a ton.

I have another question.

I have to 2 access databases and one mysql on linux server.

I want to make to sync access databases tables data with mysql tables.

means:- table 1
table 2 suppose from access database -1
table 3 table 4 from access database -2

and i have same four tables in mysql

so i want that if someone updates in access tables that update should come in mysql tables

i thought of using sync or trigger but not getting any proper example to start with.

if u know this please do tell me .I need these 2 things by the end of the day :
 

Users who are viewing this thread

Back
Top Bottom