I will offer some sample code of the TreeView OCX control used to organize reports in an application I developed. Indeed the Reports open in Print Preview mode.
'Open the report
DoCmd.OpenReport ReportName:="CapitalSpendingByProcess", _
View:=acViewReport, _...
Impressive design thus far.
Perhaps insert / concantonate the vbCrLf character every 75 real characters?
Note on text field control character limits...
Form and report
Attribute Maximum
Number of characters in a text box 65,535
From:
Access 2007 specifications...
Very well. I believe the only sticky point with what you envision doing is in obtaining a VBA variable which is binary compatible and able to store how ever much data a spreadsheet file has. Variant comes to mind first.
Definitely I would suggest ADO.Command / ADO.Parameters to interface...
You are looking to write the .xlsm binary file contents to a varbinary SQL Server column and are thinking to use Access VBA to read the .xlsm binary files and transfer the content to SQL Server for storage?
Or are you thinking to have Access open the .xlsm files, read the data contained within...
It looks like what you have is simply a column name that the query engine is unable to map to a physical column in the database table.
You never told the query you want a Summation performed and placed into that new column name.
I would suggest, pseudo code:
SUM([source column name here]) AS...
Nolan,
I had better success asking MSXML questions in the MS forum rather than here, even though I am using MSXML within Access VBA. Here is the link to that forum:
XML, System.Xml, MSXML and XmlLite Forum
Samples of my use of MS XML6 objects:
Rushing I was forgetting that this query runs against SQL Server, not the iSeries. So yes, in this case I know the schema of the SQL Server DB and a Long is big enough... Integer in SQL Server.
Numbers coming from the iSeries are much harder to guesstimate accurately the upper possible range...
Unfortunately even the solution I found to get more of an error message back from DAO.QueryDef objects does not guarantee that the error message returned to VBA is the same as what would have been displayed running the QueryDef objects interactively via the Access UI. Case in point example...
Aaahhh, that is very nice.
And using that Object Browser, I see you have the ability to (for example) see what constants come with MSComctlLib only, so if I did not have to have that one checked as a reference in order to put the control on the form, then I could develop a Late-Binding VBA...
I did a global search through all VBA code, I find nowhere "vbNormalNoFocus" yet as I showed in my OP, the Immediate window does see the constant defined somehow.
I have only added a reference to "Microsoft Windows Common Controls 6.0 (SP6)".
Otherwise I rely on Late-Binding VBA coding style...
Greetings,
I just realized that I do not know where my ShellAndWait module is obtaining the constant definitions for the WindowStyle arg. They are all defined presently:
? vbHide
0
? vbNormalFocus
1
? vbMinimizedFocus
2
? vbMaximizedFocus
3
? vbNormalNoFocus
4
? vbMinimizedNoFocus...
I make use of the TreeView control in an OCX, and at least for that one I never see a listing in References for it.
It is necessary to obtain that control via the GUI Form Editor and select the OCX component icon on the Form designer. Perhaps for your OCX it is suppose to work the same way.
SELECT queries need not be anything besides read only. INSERT / UPDATE are queries that may not be read only.
Were you being sneaky having a Form issue an editable SELECT?
In that case, I offer a sample UPDATE SP for your reference...
/************************************************************************************/
/* FILENAME : products.clsObjProductsTbl_Update.sql */
/* TYPE : SQL...
I believe those functions are actually a part of DAO, thus the query was downloading EVERY row to the client machine and performing those DAO functions against the data.
Such queries could not be passed directly to the SQL BE DB to be executed by them on behalf of Access.
And there is in the...
Here it is again...
ADO is one of many standards MS has developed over the years. ActiveX Data Object I believe is what it stands for. This is able to be developed in VBA code.
I am recommending you move out of your norm of building queries with the query designer UI and into building...
Solved!!! Wowsers....
This is what was going on. Windows 7 x64 + Access 2010 x86 = need to move program settings in the registry due to:
Running 32-bit Applications \ Registry Redirector
http://msdn.microsoft.com/en-us/library/aa384232%28v=vs.85%29.aspx
So the program running in x86 VBA still...