I have a control button on a form that outputs the current record to disk using an on click event. The user currently has to select the format (rtf) the path and the filename and I would like to be able to automate this process.
The format should be rtf, the path will always be the same and I would like the file name to comprise the unique record number (4 digits) followed by the current date string (format ddmmyy).
I think is just a matter of setting some parameters after the DoCmd code event that saves the report to file but I have had a go but can't get the syntax right.
Any ideas how to automate this process to eliminate the risk of user errors?
Is is feasable to output a report with variable data to html/email. I would like to be able to send my quotations and invoices via email to my customers as many are now requesting I use email. At present I have to print it as PDF then open Outlook, then attach the PDF document etc etc.......
Any assistance or suggestions greatfully welcomed.
I currently have an invoice report that runs through my database which is e-mailed to clients (automatically through vba), and then saved to a specific file path.
I'm currently having an issue with the saving part of the process with certain clients who have illegal characters in their names - for example, "Client / Other Information" where the '/' is causing the save to fail.
I'm trying to find a way to change the file name of the save file for clients with these illegal characters in their names. I would prefer not to take only part of the name (as some clients are listed as "Town/Village of...") but if there is no other way then there is no other way.
I have several reports that creates price sheets for all of my customers. It is a report with multiple subreports within, and I am trying to create a process to seperate them and export them all into [Customer Name].pdf. I have tried to scrap some code together from various forums, and it has been unsuccessful.
For example, one of the reports "rptPriceSheetQuarterly", has a field "txtCustomerName", that feeds the queries for the other subreports. I would like to create a new PDF when that field changes.
I understand I need some sort of looping code that will cut the report up dump them all into one folder, but I am totally out of my element here.
I am not even sure where to start with this small problem that will make a big difference.
I have a database that produces yearend accounts, its highly specialized to my industry.
The year end accounts have schedules these can be 1 to 3
On my form I have it set up for 3 schedules, but can be used for 1 and 2 schedules accounts.
However when it come to the reports for layout reasons 3 of the 14 reports needed are tailored to a 1, 2 or 3 schedule, and i have created reports and buttons on the form according to the number of schedules for that account.
What I want to know is this, I have a field on my form that states the number of schedule for that account, is it possible that if say the account i am working on is a 2 schedule account, that it disables the 1 and 3 buttons?
Been hunting a round looking for some code that will output my access report to excel but more inportantly add a unique field from the report to the name of the file. example would be [FileName] & [ReferenceNo].xls.
I am in need of assistance with Microsoft Access. In the reporting function of Access I am trying to have a summarization total of indirect time and direct time based off a Auditor Timesheet form developed. On the report I am able to see both the direct time and the indirect time hours seperate per auditor based on the query that is run to seperate direct and indirect hours and each individual auditor stats.
but the problem I am having is trying to summarize on the report the total direct and indirect hours as a whole.
Please let me know if this a simple solution by building an expression in the field for the report or some type of VBA code input which would suffice?
the following code saves my report in a folder called test as a pdf file with the name MyReport. I have a string variable called RepName. How can I make the report get saved under that name.
I tried DoCmd.OutputTo acOutputReport, "Estimate", acFormatPDF, "c:Test&MyReport&.pdf" but it dosent work.
I need to know if exist the system in Access 2007 to output a report in word document including images. Normally the output is "*.rtf", with a quite good quality but due to the file type it doesn't include the pictures.
This error occurs at the OutputTo line. This code is part of an user form with a button “save as PDF”. When this code is run, the report is visible as an example (as meant to be) on the screen. The code stops at the OutputTo line.
When I use DoCmd.OutputTo acOutputReport, StrReport, acFormatPDF, StrDocumentName,, False the problem still exists.
I tried to save the report manually by Preview > Export > PDF. The preview is OK, saving as PDF results in the same error 2501. This may lead to the conclusion that this problem is not caused by the VBA code.
I verified whether user write rights are OK, and whether a default printer is available. Both are OK. The report consists of 1 page. When this very same application is used with Access 2010, everything functions as expected.
Whenever I export reports to PDF, the output appears zoomed and clipped. No extra pages are generated as they would be if I'm going over margins, it's just the report is clipped.
The report looks perfect in preview mode, and it looks perfect when going to an actual printer. However, when using OutputTo to save it as a PDF, this is when the report content is clipped.
I open the report in preview mode first so events are fired that show/hide various objects based on fields in the recordset.
I've tried reinstalling, and I've tried this on two different machines, one running Windows 7 and one running Windows Server 2008...both with the same results.
I have a sql string that is used to populate a form and now I'd like to export that set of records to a spreadsheet but I can't get 'OutputTo' to work. It wants a predefined query name - !? Any suggestions?
guys the below works a treat on a single qry -(pinched from samples) however I will have 20-30 qry that I want in this 1 workbook all on seperate tabs . Now I have also tried getting this done cross refer to "qryto excel automation" and have had some particual succes - but does any one know how to do this
I've created code to export data from a query to a spreadsheet and it works fien. My question is, is it possible to set up an SQL statement in code and export the results of the SQL to a spreadsheet instead of using the saved query?
Im reading Selecting the Data from Running Microsoft Access 2000, pp. 87-94. The confusing part is the input/output explanation. When I think of input I think of typing, keying, or entering raw data into the computer. Output to me is information displayed or printed.
Okay, here is what was printed:
A data item is an input for a task if you need to read it from the database (but not update it) to perform the task. For example, a customer name and address are some of the inputs needed to create an order. Likewise, data is an output for a task if it is new data that you enter as you perform the task or that the task calculates and stores based on the input data. For example, the quantities of items you enter for an order are outputs; the shipping address and phone number you provide for a new order are outputs as well.
The above is confusing me. Can anyone explain it better so this dummy can get it? Thanks!
I have a select query that selects certain customer email addresses and I want to output the results as csv, which can be used directly in a "To:" field to create a group email.
The SQL of my query is:
SELECT [Customer Details].[Email Address] FROM [Customer Details] INNER JOIN [Orders] ON [Customer Details].[Customer ID] = [Orders].[Customer ID] WHERE ((([Orders].[Licence Declaration])=No) AND (([Orders].[Licence Status])="Unlicensed"));
I have found some SQL code on the internet as follows:
"SELECT Field1, field2 FROM table WHERE field1='" & [FORM]![PARAMETER] & "';"
but adapting my code with that is a little bit beyond me...can anyone help?!
If I open a query in Access and uses the "Export to Excel" button everything works out just fine. But when I want to make the export with a button using the code: DoCmd.OutputTo acOutputQuery, "qryToExcel", acFormatXLS
I only get 255 chars from the PM-fields to excel. Can anyone help me solve this problem?
I also want to make some filtering, with code string, to the query before I export it, could use some suggestions there also.
I have a query which pulls key fields from a Table and exports to an excel file through the Output to cmmd.
In the table, i have defined a few fields with Look-up criteria and Combo / LIsts. When the Excel sheet is created the Lists are not downloaded. The purpose is to scrub the data and provide users an excel sheet for update of the Combo box for upload in another MS access table.
Please help, this feature is extremely critical for our work. Thanks in advance.
Attached is a real simple database. What I want to be able to do is insert new payment details, and I have a couple of issues.
I have two clients and need to be able to select which client I want, select the payment details from the drop down list and enter in some appropriate amount.
Its been a while since I've created a db from scratch so this is obviously where I am having my difficulties. However I think I need to use a sub form.
How can I input the details as above, and how can I always get the combobox to default to the first entry in the list rather than defaulting to zero?
I've got a huge problem. Lots of questions I need answers to, but I'll start with this. I have a client I was doing some web design and basic Access work for, and now they want this sorta-complicated database and I'm getting lost.
It's a big customer complaint database for a big manufacturing company, a local branch. I have all this data in one table because that's what they want.
One of the items is whether or not the company has a debit with a particular complaint, and, if so, how much it is.
The thing is, this debit number (currency) might change (update), but they want a YEARLY and MONTHLY report on "how much money we've lost, altogether."
Where do I start with that?
Big thanks to anyone who can lead me in the right direction. I have some experience with Access, but I'm by no means an expert or programmer.