Hi dfarland
You Can Use A query to get a filtered recordset like this
Dim DbEngine As DataBase //DAO, Can Also use ADO
Dim rs As Recordset
Dim strSQL As String
Set DbEngine = OpenDatabase("C:\Sales\StoreDB.mdb")
strSql = "SELECT * FROM data ORDER BY /*ENTER FIELD...
Okay I solved this one myself after hours of trial and error and i will tell you how incase anyone makes a similar mistake.
The Problem was that I had to reference every entry or change with the names I had given the Application, workbook and worksheet.
So wereas above I entered data into a...
Sorry Vikalp
I Have To populate every cell individually as well, but luckally none of my reports have that many records. I seems that there should be an easier way, such as creating the pivot table direct from the recordset but I haven't been able to do it yet. let me know if you figure out a...
Hi VikalpJain
I don't know if I Can be much Help to you as I couldn't find a way to create the pivot table direct from the recordset, wish I could. I had To print the record set into a worksheet first then create the pivot table from the columns. This is my final code for creating a pivot table...
Okay I Know this is a problem already dealt with in a number of posts But I have Tried the solutions and Excel is still hanging when I try To close it.
If I open an Excel application and worksheet and then close with out doing anything to the sheet I have no problem and I can reopen and close...
Hi
I am running three qrys to enter dates into three combo boxs.
1 box is for the dates in month format.
01/01/03 to January 2003
2 box is for the dates in Year format.
01/01/03 to 2003
3 box is for the dates in Quarter format.
01/01/03 to Q1 2003
07/01/03 to Q3 2003
The following work...
Thanks xlbo
Both tips where useful and the pivot table is now opening.
I unfortunetly can't use the get external data option in excel as My query needs data from my vbform
I didn't know about recording macros so this is a great tip to save me time in future
Thanks again
aine
Hi I am having problems creating a Pivot Table from VB code. My Code below runs a database query and returns the results to a Recordset,
It then puts the contents of the recordset into an excel worksheet (Sheet1), this works fine even though i have a feeling I went a roundabout method of doing...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.