Unfortunately I'm a bit short on knowledge of VBA and only know enough to start being dangerous. I've spent 3 days researching these forums and several access programming books in an effort to solve my problem but have not been able to sucessfully apply code examples I've seen to my database.
I have a dynamic query I'm creating in VBA based on a form with a dozen options and currently have it stored in a string variable. I need to export it to Excel (a file or just open it in a new spreadsheet in Excel) which I wouldn't think is too difficult but I have been unable to get even a simple test to work once yet. My requirements are when exporting to an excel file the user needs to be able to choose the directory and filename as the .mdb is located on a mapped location from the server that may vary by user and some users may be using remote desktop or VNC to get to it, also several users may be in the database at any given time.
In the past I've had actual queries in the .mdb that I just ran a DoCmd.OutputTo on and everything runs great.
I'm not sure the best solution to my problem and I've been unable to get any method I've seen to work. Any advice on the method and if possible a straight forward example would be incredibly helpful.
I have a dynamic query I'm creating in VBA based on a form with a dozen options and currently have it stored in a string variable. I need to export it to Excel (a file or just open it in a new spreadsheet in Excel) which I wouldn't think is too difficult but I have been unable to get even a simple test to work once yet. My requirements are when exporting to an excel file the user needs to be able to choose the directory and filename as the .mdb is located on a mapped location from the server that may vary by user and some users may be using remote desktop or VNC to get to it, also several users may be in the database at any given time.
In the past I've had actual queries in the .mdb that I just ran a DoCmd.OutputTo on and everything runs great.
I'm not sure the best solution to my problem and I've been unable to get any method I've seen to work. Any advice on the method and if possible a straight forward example would be incredibly helpful.