Trying To Save Report To Specific File
May 12, 2005DoCmd.OutputTo acOutputReport, "MD Form",".xls" "C:Documents and SettingsKevanAlderton.THERMOSHIELDDesktop", True
any ideas what is wrong ??
many thanks
DoCmd.OutputTo acOutputReport, "MD Form",".xls" "C:Documents and SettingsKevanAlderton.THERMOSHIELDDesktop", True
any ideas what is wrong ??
many thanks
I want to create a Macro saves the report in a specific location, and uses two fields within the report to generate the name of the file. For example, "[Sales Rep Name] + [PayPeriod].pdf" and it should be saved in a predetermined folder.
View 1 Replies View RelatedWe have a server that we use to run a Microsoft Access application. This application creates folders, subfolders and files on the server.Users are in 4 different offices. Each office has at least 3 computers. Some users also work from home.
Users creates file through word, or scanning a document or by saving an email on their local pc.My problem is that users need to be able to save a file to a specific folder on server.
I need code for save dialog file ,and select the file from textbox and save it to the selected location.i have only this code and i dont know what else i can do with this because it just opens the save file dialog !
View 1 Replies View RelatedMy reports are saved as a PDF at the moment I click the print report button, select cutePDF Writer then manually add the Quote number stored in Field from the Table or form into the file name, then select the location to store the PDF file
Can I make this process automated when I click the print report button to auto select PDF Print, then auto populate the file name with the quote/Inv Number and then save to nominated directory.
I want to save my report as excel file on the user computer with a click of a button. I have tried this code:
Private Sub Cmd_ReporttoExcel_Click()
DoCmd.OutputTo acOutputReport, "Gastrolog Report", acFormatXLS, "C:UsersXXDocuments" & Format(Date, "yyyymmdd") & ".xls"
End Sub
But it is giving error 2282 - The format in which you are attempting to output the current object is not available.
The other part of this question is :
This is something similar when I didn't have "PDF add in " in access 2007, when I added PDF add in then option to save file in PDF was available in "output to" action of macro. There is nothing like excel add in. However when I can export the data in excel sheet by Export function in access why don't I have option to save file as excel in "output to " action in macro? I want to have this option so that user can click a button in the form rather than in the top ribbon try to find out how to transfer and save the excel sheet.
Trying to make this code work, don't know how to filter as it prints identical all reports.
Private Sub cmdExportPDF_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim MyPath As String
MyPath = "C:Reports"
If Len(Dir(MyPath, vbDirectory)) < 1 Then
MkDir (MyPath)
[code]....
I'm trying to save a report to my Desktop as a pdf - adding a date {that I am retrieving from a query} as part of the pdf file name.
I get a
Run-time error '2501' - The OutputTo action was cancelled.
(See screenshot).
Here's the code I'm using. So far - all I've tried to do is run the function from the Visual Basic Editor.
Function SaveReport()
Dim strSQL As String
Dim strPath As String
Dim strFilename As String
'Get the ReportDate.
[Code] .....
I am trying to create some code for a button in a report that will follow a hyperlink to a specific file. The problem I'm having is that the files that are at the end of the hyperlink can have various extensions (*.doc, *.docx, *.pdf, etc.) I'd like to be able to put a wildcard in the code to allow the opening of the file regardless of the extension.
Code so far:
Private Sub Command6_Click()
Application.FollowHyperlink ("C:UsersjbeggDocumentsAccessTestFolder" & [FileName] & ".*")
End Sub
I have a few selected reports on an Access 2007 database that users can run. Is there a way for users to view the report, save as a PDF and automatically save a copy to a shared drive by modules/vba coding as an On Click event procedure?
View 4 Replies View Relatedhow using vba i can take a screenshot of my screen and save the pdf or whatever form its in into a specific folder path.
View 1 Replies View RelatedHow to let the user save a preliminary version of a record in a form? I have a table with records representing airplane status. Sometimes, the user wants to save a preliminary version of the status and create some other versions and save all of them for that specific airplane, but this does not happen for all the airplanes. How would I do that? Is it possible at all?
View 1 Replies View RelatedHi guys, little question.
I really like Access, I can manage well with it. But I have a problem, and I really wonder why this kind of thing happens in such a professional program using a lot of important data.
Actually the program saves automatically, and I don't like it. For example I try a little something, delete some stuff, replace by something else, and when I quit the program, it doesn't say a thing, and when I come back, the unimportant stuff I changed is still there, and what was replaced is lost. Why? Is there any way to force the program to ask if I want to save the changes?... It's really annoying and I really don't feel secure with my data with this system.
Thanks for your clues! :)
Hello,
I am using a useful function to save data of a form using the snapshot utility. I open the form, add or change data and sent the form to other users via e-mail. The snapshot uses a report. The code to do this is the following:
Me.Refresh
DoCmd.SendObject acReport, "EmailmyForm", "SnapshotFormat(*.snp)", "", "", "", "Action Required", "Please take action on the attached case.", False, ""
I was now thinking if it is possible to save the shapshot report as a file directly into a selected folder on my S drive (ex. S0000abmyfolder. I will need that the file is automatically named for my with the SSN present on the form.
Any idea or help? Thanks.
This question has 2 parts.
The first part is
Is it possible to export a query so it wil save as a .CSV file?
Second Part
Is it possible to have this report run automaticaly every day?
Thanks for your help in advance!!!
Good Afternoon,
Does anyone know where I can find a sample db that will let the user do the following:
Selected a file from their computer and upload to a the same folder as the db?
I am building an Investigation database. This function will allow the user to attach file to an investigation. (the files will be stored in a folder and logged on a table)
Any help would be great.
Thanks,
Bones
I have a problem. This problem is that when I generate the report, I want to show a save file dialog box. How can I do this and and retrict the files show to only "*.pdf" files. I tried it as follow:
Private Sub SaveFile_Click()
Set FDialog = Application.FileDialog(msoFileDialogSaveAs)
With FDialog
.Filters.Add "Acrobat Files", "*.pdf" .Show
End With
End Sub
error is araised when executing .Filters.Add "Acrobat Files", "*.pdf": Object doesnt support property or method.
ALSO How can I pick the path the user selected?
Thanks
I currently have a working model which opens up a word document template, fills the bookmarks with info from access, saves the file as a preset name and then send the document on Outlook.
What I would like to do is save the document as a variable, preferably as something like " Climbing Request for site (and then to lift the site name from Access form field and insert here) "
E.G " Climbing Request - Newcastle Central Station.doc"
The location of the site name on access is...
Code:
objWord.Selection.Text = Forms![Front Page]![Site 2 Owner]
Currently I save the document using the below code...
Code:
objWord.ActiveDocument.SaveAs2 FileName:="C:UsersmedesktopFrom Colino2test.docx"
This is the last step before "launching" my database automation.
i'm using a form with an unbound text box to temporarily hold data that i want to use in several other places (all those functions work great). last step is to save the newly created table with a different name (will be used for a mail merge later so must be a separate table or else we'd have to filter thousands of records during each mail merge) and i want to use the data i've temporarily held in my unbound text box within my form as the name in the save as function.
can i specify a variable as a file name within the save as function? is there a better way?
Using Access 2000, I have a macro to generate a report by updating various make-table queiries. I would like for the macro to print the report to an Adobe PDF file and save the file as the database name.
When I manually print the report, it gives me the opition of selecting printers and Adobe PDF is listed as a printer. After selecting the "printer", a "Save As PDF" menu pops up and currently it lists the Access Report Name. I would like to use the database name as the name of the PDF file.
In short, when I execute the "Generate Report" macro, I want the end product to be a PDF file using the database name as the PDF file name.
I want to save NOW() (i.e. Date and time) into an event log file. But I just cannot work out the syntax. My insert statement works fine without the date field in, but fails on a syntax error (3134) when I include it.
strsqlac = "INSERT INTO EventLog ( EventTime, User, EventType, EventMessage, DocRef, AutoSeq, CoCode ) " & _
" Values ( '" & Now() & "', '" & GlobUser & _
"', '" & Mess2 & _
"', '" & Mess1 & _
"', '" & Docref & _
"', " & AutoSeq & _
", '" & CoCode & _
"' );"
... it's the first column, EventTime that is the issue. I have tried several different ways of wrapping it in the VALUES () without success.
My database field EventTime is defined as a General date which Access 2007 tells me will give me date and time. That's what I want.
The Value formats I have tried (currently showing as 'NOW()' above, are ...
#NOW()#
#'NOW()'=
'#NOW()#'
and (as I say) 'NOW()'
I find the following CODE online (Print to PDF). Which work perfectly for me, the only issue and/or modification I am looking for "Popup Window to save the file at any location", instead at fixed location.
Option Compare Database
Option Explicit
Function PrintToPDF(SrcFile As String)
On Error GoTo PrintToPDF_Err
'Function can be called from any report with this: "PrintToPDF(Screen.ActiveForm.Name)"
[Code] ....
I would need removing the lines from an .xls file(stored in shared folder) and saving the same. I used the below code and not successful in removing and saving the file stored in the shared area..When I execute the code, Cursor hangs at this line
Set objWB = objXL.Workbooks.Open(filename)
Code:
Set objXL = CreateObject("Excel.Application")
Set objWB = objXL.Workbooks.Open(filename)
Set objWS = objWB.Worksheets("Sheet1")
objWS.Rows("1:6").Delete
[code]...
I want to open the 'Save Backup As' Dialogue Box from the file menu, using a Command Button on a Form in Access 2003.I know you can do this manually but I would love to do it programically.
View 4 Replies View RelatedI am the new for the vb little bit know the access, while exporting excel from access query, i require save field name as file name.
View 2 Replies View RelatedI have a table with an attachment field called email, where a .msg file is stored for each record. Looking for code to save this contents of this field in a folder in my drive.
View 1 Replies View Related