Closed joyfullservice closed 2 years ago
Hi @StefanB1983, I have created an issue for this discussion since it sounds like we might be dealing with a potential technical issue here.
What is the exact error that you are seeing? Is there anything addition in the log file that points to the problem? Any additional clues or screenshots that you can provide will help us understand more about what is happening. I can't think of anything that would prevent a large query from being exported, but I haven't personally worked with one containing over 1000 lines.
Hi @joyfullservice , thanks for the fast reply. Indeed forgot to add the printscreen.
Below an image of the error I see when running the export
What I can see from the export folder is that the .bas file exists for this query, but the .sql file is missing
When I run the export with the debug option enabled it stops at the position below. Almost sounds like it is related to the size of the query although when I save the query manually the file size is 34kb.
Hope this helps.
Kind regards, Stefan
Hi @StefanB1983,
Thanks for the additional screenshots! Could you make one additional change as well? If you turn on the VBA option to break in class modules, you can see exactly where the export is hitting this error. I think that would point me in the right direction in potentially resolving this.
Thanks!
Hi @joyfullservice ,
When I open the options dialog I have a different setup then yours. Do you know why?
Just to clarify, this is the VBA options dialog in the Microsoft Access Visual Basic Editor, not the add-in options.
Thanks that is clear. I have ran it again and now it breaks at the following line of code
Thank you! That is where I thought it might be encountering the error. Can you try something else for me? Try running the following code in the VBA immediate window, using the name of your query.
?CurrentDb.QueryDefs("qryNavPaneGroups").SQL
This will allow us to determine whether the error is coming from Microsoft Access, or from the add-in. If the error is from Access, we may be hitting a system limitation that we can't do much about. (My hunch is that the problem is with the query definition being so large) If this is the case, here are a few things you could consider with your project:
I hope this helps!
When I run the code I get the following. I guess that means it is a limitation of Access. I will see if we can simplify the query. Thanks for your quick response and help!
Hi @joyfullservice , I have adjusted the query and that indeed resolved the issue. Thanks!
Hi @joyfullservice , I have adjusted the query and that indeed resolved the issue. Thanks!
Glad to hear that! I will go ahead and close out this issue. 👍
Discussed in https://github.com/joyfullservice/msaccess-vcs-integration/discussions/309