I just signed up with stackoverflow and this is my first question. I am working on my first Access project. Although I have some proficiency in using VBA in Excel, it is really just a general programming knowledge and searching the web for someone else to give me the syntax. I still haven't completely figured out how objects, methods, etc. all work.
We have data stored in a proprietary format that we can save as CSV. The data contains data points based on time. I was able do what needed to be done in Excel but that fell through when we exceeded the million plus rows. Access handles the task easily but now I need to create some code to import the data into tables with relationships (done), create queries (stuck here), allow the user to select a time range and export the data in the time range to an Excel spreadsheet (I should be able to two the latter two).
As I have always done with Excel, I've looked for the correct syntax on the web but everything seems to use the DAO reference. Doing somethings as declaring a database using DIM db as DAO.Database fails with Compile error: User-defined type not defined. I've read that the Microsoft Access 15.0 Object Library should run all the Microsoft DAO 3.6 Object Library code but not for me.
So after this long-winded explanation, I could use the answer to either of two questions.
- Is there something I am doing wrong with the references or coding that would allow me to use CreateQueryDef and others?
- Is there another way to create a query without using DAO tools?
This is my first question ever on any forum. I've always managed to find a solution I could make work. Hope I haven't broken too many "How to post a question" rules. Any help with this would be greatly appreciated.
Thanks a bunch.
ToniP