Yes, vbajock is correct in suggesting you use the underlying query of the report. I have used the code below behind a command button to open a query as an Excel doc.
The CurrentProject.Path simply opens the excel doc in the same folder as your database.
Dim eVersion As String
eVersion...
Thanks so much to Randy700 and mgolla for their quick replies - a star to both of you!
This did the trick:
DoCmd.OutputTo acOutputQuery, "qryOpenOfficesExcel", acFormatXLS, CurrentProject.Path & "\" & "OpenOfficesExcel.xls", True
I cannot find the equivalent of "AppPath" (VB5) in Access. Just trying to soft code the location of the open database in order to save the Excel file as referenced below.
DoCmd.OutputTo acOutputQuery, "qryOpenOfficesExcel", acFormatXLS, "OpenOfficesExcel.xls", True
Can anyone tell me what to...
Jeremy,
Thank you for such a quick suggestion. I neglected to mention that the text box is an unbound control - only used to display it's contents on reports. With this in mind, should I still create the one record table or is there a way around this?
My form opens with a default name in a text box control. If the user changes the name they are prompted to change the default, or leave it like it is. The code below does not crash, and even changes the default in the form properties box - BUT when the form is closed and opened again the...
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.