MS Access VBA to format MS Excel export Problem

BACKGROUND:
What I have already done is export data to MS Excel (via ADODB). What I want to do now is draw a box around the selected range. How do I do this.

GOAL:
Draw a border around the output range in the MS Excel export

SUMMARY OF EFFORT:
I can draw a border around each cell within the range, center align the values within each cell, and autofit the column width property with the following block of code

Quote: With WS.Range("A1:X49")
.Columns.AutoFit
.HorizontalAlignment = xlHAlignCenter
.Borders.Weight = xlMedium
End With
Unfortunately I don't want to outline every cell.


I want to outline a predefined range. If I was writing the code for execution within MS Excel VBA it would look like this. How do I adopt this block for execution within a MS Access VBA module?

Quote: Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Any help with syntax would be appreciated.
________
Granada (Europe)


Post your answer or comment

comments powered by Disqus
Hello,

I am trying to automate the formatting of an Excel spreadsheet from Access, using VBA.

I have managed to do most of what I would like to do by first creating a Macro in Excel then using the macro code as a basis for the VBA code in Access.

But I have run into trouble to trying to execute the Autofill Destination command. These are the two different lines I have used:


Dim excel_app As Object

Dim excel_sheet As Object

...

excel_app.ActiveSheet.Range("I2").AutoFill Destination:=excel_app.ActiveSheet.Range("I2:I" & excel_app.ActiveSheet.Range("A65536").End(xlUp).Ro w)

excel_app.selection.AutoFill Destination:=Range("I2:I25403")

However both produce the following error:

Run-time error '1004':

Application-defined or object-defined error

Any help or guidance would be most welcome!

Cheers,

dj_T

Hi,
I need some help to export the report from MS Access 2010 to MS Word 2010 format. Here are my questions:


a) I see RTF format not the word format during the export?
b) Is there any other way to export the formated report in correct format?
c) Can I fix formating like: 1" space from left etc. during the export?

Thanks,
Amir

I have just posted a blog in MS Access hints and tips here: Sending Google Mail (Gmail) from MS Access, VBA, Excel, Word...

Escape From Outlook
Microsoft tightly combine their applications together however sometimes it’s nice to escape from Microsoft Products and use others. Here I demonstrate how you can use Google Mail to send out an e-mail from an Internet connected PC, and you can also do this covertly!
This Example is From:
Windows® XP Under the Hood, Pg. 266 Chapter 6 Messaging and Faxing Objects
Extract
This basic example sends a simple, no-frills text message every time the script is run: Example File: script0603.vbs As you can see, the original file was a VBScript file; I have converted this to VBA.

Google e-mail Account
I have also set up a Gmail account to send the emails through. You are welcome to use this account for testing, however I suggest you set up your own Gmail account and change the hard coded information where necessary if you intend using this code for your own purposes.

Gmail From MS Access (the Video)
Can't show the video here!

Text from the above Video
This video is of a demo MS Access database which shows you how to send an e-mail from Google mail using
VBA. Press the “Send a Test Email” button and wait and then you get this message saying that the message sent is "True". It doesn't necessarily mean the message has been sent, it just means the code operated successfully. It is not necessary to have that confirmation message appear, this can be hidden, hence you have the ability to send email from your application covertly!

Hey all,

So I have an Excel macro that has the following:

	Code:
	Sub Test()
Rows(2).EntireRow.Insert
[D2] = "ABC"
End Sub

which adds a new row (at row 2) and inserts "ABC" in cell D2.
However, I need some way to embed this code behind an Access button in VBA. I understand that you can call an Excel Macro from Access, but the Excel document is changing often and will not always have the macro attached.

So my question is: How can I open the Excel document, insert a Row at line 2 and type "ABC" in cell D2, and save and close the Excel document? ALL from Access VBA, It is not possible to have any macros saved in Excel.

My .xls file is named "importtest.xls" and the sheet where I want to do this editing is "Sheet1"

Thank you very much! Let me know if I was unclear, seems like a long question.

On trying to import an Excel 2007 file into Access 2007 I get the following:

1) Choose "External Data," Import, Exce
2) Select small file in MS Excel 2007 format.
3) Click on Import the source data into a new table ...
4) Choose OK

Immediately get "Microsoft Office Access has stopped working. Windows is checking for a solution to the problem..." This message never resolves, so I have to click 'Cancel'.

Then I get "Microsoft Office Access is trying to recover your information..." I have to click "Cancel" here as well and then kill MS Access in Task Manager.

Event Viewer gives following message, which is of no help:
"ID: 2, Application Name: Microsoft Office Access, Application Version: 12.0.6211.1000, Microsoft Office Version: 12.0.6215.1000. This session lasted 710 seconds with 120 seconds of active time. This session ended with a crash."

Trying to import a small Excel 2003 file leads the same result. The same happens with a CSV file.

I have uninstalled and reinstalled Office 2007 as well. I am using Vista Ultimate.

I have turned off DEP.

How can I get MS Access 2007 to import Excel?

Thanks

Ken

Got this to work in Access 2010. Took a while to solve my specific problem, an XML file with a Stylesheet.
This web site has many different XML examples.
Hopefully, some of you can modify this for other XML examples and to save into a Access Table. There does not appear to be a lot of solutions to be found.



	Code:
	Public Sub Transform(sourceFile, stylesheetFile, resultFile)
      ' For Access 2010 VBA  ----> Menu Tools Reference   choose  Microsoft XML, 6.0
      ' Example of using Access VBA to grab an XML file from the web (or file location)
      ' that has 2nd site with a Style Sheet.
      Dim source As New MSXML2.DOMDocument30
      Dim stylesheet As New MSXML2.DOMDocument30
      Dim result As New MSXML2.DOMDocument30
      ' Load data.
10    source.async = False
20    source.Load sourceFile
      ' Load style sheet.
30    stylesheet.async = False
40    stylesheet.Load stylesheetFile
50    If (source.parseError.ErrorCode  0) Then
60       MsgBox ("Error loading source document: " & source.parseError.Reason)
70       Else
80    If (stylesheet.parseError.ErrorCode  0) Then
90          MsgBox ("Error loading stylesheet document: " & stylesheet.parseError.Reason)
100      Else
            ' Do the transform.
110         source.transformNodeToObject stylesheet, result
120         result.Save resultFile
130   End If
140   End If
150   Debug.Print "Error is " & Err.Number
' To run the above - This is a web site that has simple XML sites
' The example is a XML file with an associated XML Style Sheet
' To run the above code - and save the result in C:MyFolder
' Transform "http://www.w3schools.com/xml/simplexsl.xml", _
    "http://www.w3schools.com/xml/simple.xsl", _
    "C:myfolderAtemptempImport.xml"
' Rx_


End Sub

Lets say you have a XML document and just want to create a new table that matches the simple format:


	Code:
	Public Sub ImportXMLFile()
         ' Purpose: Imports the data and structure of an XML file.
         ' Go create a new blank Access DB in C:MyFolderXMLtestDB1.accdb   with the name XMLtestDB1.accdb
         ' this XML structure does not have a style sheet - just import it into a new Access table
         Const STRUCTURE_AND_DATA = 1
        Dim appAccess As Object
10       Application.ImportXML DataSource:="http://www.w3schools.com/xml/simple.xml", _
             ImportOptions:=STRUCTURE_AND_DATA
20    Set appAccess = CreateObject("Access.Application")
30    appAccess.OpenCurrentDatabase ("C:MyFolderXMLtestDB1.accdb")
40    appAccess.ImportXML "http://www.w3schools.com/xml/simple.xml"
50    appAccess.CloseCurrentDatabase
60    appAccess.Quit acExit
70    Set appAccess = Nothing
        ' now go open up the Access DB and look at your new table - Pick something tasty on the Lunch Menu
        'Rx_    Prescribing Solutions
        ' with out a stylesheet - just raw data
End Sub


' I didn't have to stay after work to post this - if you like it click the Thanks button


Please feel free to modify this and add your own examples.
Please list the version of Access it was tested on
The version of the XML Reference.
And, the type of XML document tested.

Hi, I am using VBA to create a report and then write my data from my recordsource from. Does anyone know how I would write a line in the Page Header section? I'm using MS Access 2010. here is my code for my Page Header and I want to put a line at the bottom of the Page Header:

Private Sub RunReport_Click()
Dim db As Database ' database object
Dim rs As Recordset ' recordset object
Dim sSQL As String
Dim fld As Field ' recordset field
Dim txtNew As Access.TextBox ' textbox control
Dim lblNew As Access.Label ' label control
Dim lblSub As Access.Label ' label control
Dim rpt As Report ' hold report object
Dim lngTop As Long ' holds top value of control position
Dim lngLeft As Long ' holds left value of controls position
Dim title As String 'holds title of report
Dim lngBlack As Long
Dim rptData As String

lngBlack = RGB(0, 0, 0)

'set the title
title = "Activity Summary Report"

' initialise position variables
lngLeft = 0
lngTop = 0

'Create the report
Set rpt = CreateReport

' set properties of the Report
With rpt
.Width = 8500
.RecordSource = sSQL
.Caption = title
End With

sSQL = "SELECT Submission_Date, Nbr_Files_In_Set, Motion_filesize, Motion_DatePeriodFrom, Motion_DatePeriodTo " _
& "From dbo_Motion_Imagery;"

' Open SQL query as a recordset
Set db = CurrentDb
Set rs = db.OpenRecordset(sSQL, dbOpenDynaset, dbSeeChanges)

rptData = "Motion Imagery"

' Create Report Header Title
Set lblNew = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Activity Summary Report", 0, 0)
With lblNew
.FontBold = True
.FontSize = 14
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Header Sub Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , rptData, 0, 600)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Submission", 200, 1000)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Date", 600, 1300)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Classification", 1700, 1000)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With


' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Nbr of Files", 3400, 1000)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Filesize", 4900, 1000)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Date Period", 5950, 1000)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "Date Period", 7500, 1000)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "From", 6300, 1300)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
Set lblSub = CreateReportControl(rpt.Name, acLabel, _
acPageHeader, , "To", 8000, 1300)
With lblSub
.FontBold = True
.FontSize = 12
.FontName = "Arial"
.ForeColor = ingBlack
.FontUnderline = Yes
.SizeToFit
End With

' Create Report Column Header Title
'Set lblSub = CreateReportControl(rpt.Name, acLabel, _
'acPageHeader, , "-", 0, 1500, 1500)
'With lblSub
' .BorderStyle = Solid
' .BorderWidth = 1
' .BorderColor = ingBlack
'End With

' Create corresponding label and text box controls for each field.
For Each fld In rs.Fields

'Create new text box control and size to fit data.
Set txtNew = CreateReportControl(rpt.Name, acTextBox, _
acDetail, , fld.Name, lngLeft + 1500, lngTop)
txtNew.SizeToFit

' Create new label control and size to fit data.
Set lblNew = CreateReportControl(rpt.Name, acLabel, acDetail, _
txtNew.Name, fld.Name, lngLeft, lngTop, 1500, txtNew.Height)
lblNew.SizeToFit

' Increment top value for next control
lngTop = lngTop + txtNew.Height + 25
Next

' Create datestamp in Footer
Set lblNew = CreateReportControl(rpt.Name, acLabel, _
acPageFooter, , Now(), 0, 0)

' Create page numbering on footer
Set txtNew = CreateReportControl(rpt.Name, acTextBox, _
acPageFooter, , "='Page ' & [Page] & ' of ' & [Pages]", rpt.Width - 1000, 0)
txtNew.SizeToFit

' Open new report.
DoCmd.OpenReport rpt.Name, acViewPreview

Cleanup:
' Cleanup all objects - close and exit form/Report
'resume next on errors
On Error Resume Next

Set rs = Nothing
rs.Close
Set rpt = Nothing
Exit Sub

'Error Handler Routine
RunReport_ErrorHandler:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description
End Select

GoTo Cleanup

End Sub

i need to convert/publish an access report to word document.
the problem is that in the normal way the word publisher convert the report into rich text format without the design. i want that the report will be represented just like it represented in snapshot.

thanks

Hello,

I incorporated MSFlexGrid into my MS Access form to have the ability to color code rows/columns. I can't seem to find a wayto right-click and have the memu popup. The method PopupMenu does not seem to exist in MS Access VBA. Here is my sample code. I hope someone can provide me with an answer or some alternative options. Thanks!

Private Sub flexGrid_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)

' Button 1 = Left Click, Button 2 = Right Click
If Button = 2 Then
If flexGrid.MouseRow >= flexGrid.FixedRows And flexGrid.MouseCol >= flexGrid.FixedCols Then
flexGrid.row = flexGrid.MouseRow
PopupMenu mnuCustomers

End If
End If

End Sub

Hi All,

Yes ok DDE may well be dead but it works for me so why change it? Basically I wondered what the commands where to format Excell cells. For example if I stamp a cell with todays date:

DDEPoke intChan1, "R3C2", Left(Now(), 10)

How would I say shade that cell black, change the lettering to white or underline or bold that cell?

Any help most appreciated.

Regards,

Dalien51

Got a small problem. I have linked MS Access to a bunch of MS SQL tables. But MS Access tries to be more intelligent and starts reformatting the data for me. Bad.

In SQL I have a few fields that are numeric,10,4. 4 decimal places.
But when I link to the table from Access, Access then decides to call the number a currency value, and will only display 2 decimal places. How do I force Access to display 4 decimal places, instead of it reformatting to what it thinks is best?

MS Access 2007
MS SQL Server 2008

hi guys, i would like to use ms access 2007 to create a checklist report, or however you call it...

XIQWh.png

i'm not sure if you can see my image since i'm a new user and i can't post images/links... here's the link without the http thingy: i.imgur.com/XIQWh.png

the above screenshot describes how my db is designed and how i want my report to look like...

is there a "wizard" way to do up such a report or i have to go through some macros?

thanks in advance!

Hi,
I have written a code in MS access VBA to contact SQL Server which is remote. There is a stored procedure in SQL Server that gets executed. I wanted to create a table in MS Access with the output of this stored procedure. The stored procedure does not create a table. The reason is this : The stored procedure returns a set of information one of which is customer number. I have to look for a particular customer#. Currently I am putting the output to a recordset using

Set rsCmd1 = Cmd1.Execute
where Cmd1 is a ADODB.Command and rsCmd1 is a recordset

I am not able to use recordset.Find method . It gives error that Rowset cannot be reset and scanning the recordset using while loop is taking time. I wanted to speed up the whole process of contacting the server, get the whole bunch of info from server, find the customer and put info in text boxes.

Will creating a table speedup the process or is there any other alternative ?

Hi I know basics of access but may I ask help. I would like to ask what are the steps how to create odbc connection without going to control panel but just using the ms access codes to create odbc connection and eventually to connect access to sql tables. thanks.

Hi

I'm very new to access and I don't have any experience. At work, I was ask to research about migration of databank ms access 2003 to 2007.

I have read in the internet that usually if you open .mdb file to ms access 2007 it will normally works. But in my case I'm getting an error: "Action Failed".
Now I'm not sure if I'm getting the correct file here.
Here is the structure of the file of the database. The database name is: Energy.

Folder Energy:
Access2003
Energy.app
System.MDW
Energy (its a link)
Energy.ini

What I did was, I made a copy of my Energy.app and then renamed it to Energy.mdb. And this file Energy.mdb I opened it to the ms access 2007.
Then I got the error.
How can I find the .mdb file? Did I do the right thing?
I also read that I have to make a copy of the front-end or back end of my database. I'm not sure where is the front end and back end now.

Is it in the SQL Server? Thanks for your help in advance.

Cheers

Hi

Is it possible to link MS Access 2007 to Lotus note ?

Example i have a table in which it has some fields in which user enter .
Upon enter , it will check and sync with the data in Lotus note .

Is it possible to achieve this ?

Just wanna find out the possibility before doing more research .

THANKS

OK, let me try to explain this ...

I have a "report categorization" application that has about 10 fields where I have a linking table to allow multiple codes based on different types of information. I basically had to go this route to get MS Access 2010 to play nice with SharePoint due to the multiselect option is MS Access client not allowing any filtering when it gets pushed to the SharePoint site. All this said, now I have the issue of basically creating the filter screen.

I know that I have to have a header that uses a temp variable to look at the aggregated string field to see if [tempvar] is in it "Select [field] HAVING [tempvar]".

This said I need to figure out how to build the macro on the "After Insert", "After Change" and "After Delete" to run. The goal would be to basically rebuild the aggregated string for a specific report to include an entry for each item that it finds in the query. Basically I want to flatten a query and make a string of one field.

If I run a query that has 4 rows where there is something like:

Form A
Form B
Form C

I want a Data Macro to fire at the time of a change / entry to rebuild a corresponding aggregate Text field to make it look like this (commas between each)

Form A, Form B, Form C

This will allow me to use that table versus the One-to-Many-to-One option to build the filter form.

Yes I know that I can have a form with subforms, but the issue that I found is that when I apply the filter to the subform it only applies to the subform and does not feed back to the master form to eliminate rows that now have nothing showing in the subform.

If the the subform option can be done to say "nothing showing in subform after filter" then you are not going to show in the master list that would also work.

Thanks all ... Hope someone can help.

MDF

Team,

How do I get a database that was created in MS Access 2003 to display and function properly in MS Access 2007?

Peace,

two_smooth

A DATABASE WILL NOT BE USEFUL IF IT HAS LIMITED RECORDS.............hi to everyone! I have requested microsoft through their customer service email if it is possible to increase the size limit of the database. I noticed that ms access 97 limit is 1 gigabyte and ms access 2000 to 2007 is 2 gigabyte. I talked to our country's local microsoft office branch and they told me that the request maybe granted depending upon the number of users who will request for the increase. Therefore I would like to appeal to all users of all MS Access to join me to email to Microsoft through their website contact to email them our concern. I have requested them if possible to increase it to 100 gig or even to terabyte. Let us help one another so that our request maybe granted as soon as possible.

https://feedback.office.microsoft.co..._master&scrx=1

I want to export data from MS Access into MS Excel and make the data appear with several rows at the top. The top rows will be filled with business name, date of report generation, report title, column titles, etc.
The problem is that I hve not figured out how to export MS Access data so that it begins to fill the page at row 5.

I've investigated docmd.transferspreadsheet, docmd.outputto, and have not had any luck. Does anyone have a suggestion on how to do this?
My thought was that I coud maybe use a DDEexecute command to insert blank rows above the transferspreadsheet or outputto data dump, then use a DDEPoke to insert static values to label the table and document.I'm not convinced this is the right approach.

Should I be using an ADODB method to force the posting of dumped data to a named range in the MS Excel spreadsheet?
________
Herbalaire Vaporizers

Hi Champions,

Here is another challenge.

My Access DB generates about 200 separated Excel files using Export.
Each of Excel files has 3 tabs. If some data is missing, some tabs might be not generated and sometimes if there is no data for all 3 tabs - then the whole file might be not generated.

Then another VBA module automatically sends generated Excel files to recipients.


Here is the problem.
When Access creates the new Excel file it does not have any formatting.
When data gets exported it looks like raw material.
No formatting at all.

The question.
Is there any way to format Excel file while exporting using the same Access module.

No details, just a main idea.

Thanks a lot.

I have a lot MS Access 2003 reports that has multiple groupings on the report that I need to export to Excel. When I exported the report to Excel everything was out of whack because of the group headers and footers. I tried exporting the report to HTML and all of the columns including the groups lined up perfectly! I could even open the html document using excel and everything was perfect. Opening the html document with Excel would work except for the fact that Access puts the report out into multiple html documents.
I need the data to be output exactly as it is on the reports with all of the groupings and totals for each group so outputting a table or query wouldn't work because it wouldn't have any of the subtotals I need. Outputting the data to XML also wouldn’t work because I wouldn’t be able to automatically open it Excel for my boss.

My supervisor wants the data with the sub totals so he can do who knows what. The reports are quite large some containing a thousand rows or more.
I know quite a bit of VBA so I could automate the process of outputting the data to an html document and then simply stuffing the data into an html document and then opening it with Excel.

Does anyone know how to force MS Access to stuff everything into one html document instead of multiple documents when exporting table, forms or reports to HTML?.

hello,

need help about an issue.

i actually have an ms access database with the following format(assuming)

title1 title2 title3 title4 title5 title6 1a 1b 1c 1d 1e 1f 2b 2b 2c 2d 2e 2f 3a 3b 3c 3d 3e 3f 4a 4b 4c 4d 4e 4f

for each row in the ms access database above i need to retrieve an excel in the format below

title1 1a title2 1b title3 1c title4 1d title5 1e title6 1f

title1 2a title2 2b title3 2c title4 2d title5 2e title6 2f

and so on....

Any suggestion from where i can proceed,what tool can i use??

thanks in advance

I have a lot MS Access 2003 reports that has multiple groupings on the report that I need to export to Excel. When I exported the report to Excel everything was out of whack because of the group headers and footers. I tried exporting the report to HTML and all of the columns including the groups lined up perfectly! I could even open the html document using excel and everything was perfect. Opening the html document with Excel would work except for the fact that Access puts the report out into multiple html documents.
I need the data to be output exactly as it is on the reports with all of the groupings and totals for each group so outputting a table or query wouldn't work because it wouldn't have any of the subtotals I need. Outputting the data to XML also wouldn’t work because I wouldn’t be able to automatically open it Excel for my boss.

My supervisor wants the data with the sub totals so he can do who knows what. The reports are quite large some containing a thousand rows or more.
I know quite a bit of VBA so I could automate the process of outputting the data to an html document and then simply stuffing the data into an html document and then opening it with Excel.

Does anyone know how to force MS Access to stuff everything into one html document instead of multiple documents when exporting table, forms or reports to HTML?.


Not finding an answer? Try a Google search.