Everything works great but I want to save the backup file with a unique name, like EX: myfile INTx.xls where intx = the date "Now", maybe, am I looking at this wrong. Thanks Bob
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 !
My 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.
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.
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)
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.
I have refined my query from previous threads to involved a module function. This calculates more acurately no of working days between dates and takes into account a holidays table. (All credit to Arvin Meyer on the module:) ) However because the Leave Year starts at the 1 July and finishes 30 Jun I need to compose the date for any current year Year(Now())
Enclosed scrdmp shows my query design. I can easily get it to work as you see it, but obviously as each year rolls over, the year needs to change.
Have looked at many posts but can't find what I'm looking for. This one will get me over the hurdle.
I have a query with a date field that is formatted mm/dd/yyyy. I have a combo box that is formatted as mm/yyyy. I need the choice from the combo box to be the criteria for the date field in the query. the combo box has to contain the month and year only (which it does now) and the query must return mm/dd/yyyy. I have tried a few statements and the closest I got was a between statement that added 30 days to the combo box selection but that's not really accurate.
I have a form with multiple textboxes and comboboxes that allow for user entry, and a subform displaying a table, where the entries from the form are saved and can be retrieved. It's basically a way of creating new task entries and editing existing ones from a single interface.
One of the fields is an "issue number" of sorts, which is a 5-digit code that identifies the task. We have a website where details of each task are stored, and the URL format is akin to this: [URL] ....
The functionality that I'm hoping for is that when the user saves the record, it will be saved as the full link address, by concatenating the static first portion of the address and the code entered by the user. However, I need the table to still only display the code, not the whole link address, and will follow the full address when clicked in the subform table.
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?
I'm trying to split up the filename into four separate fields. Here's an example of the filename:
123112 427900 55261 1156833.jpg
A 12312 B 427900 C 55261 D 1156833
The values A, B and C are always the same number of characters. The last value, D, changes in size. It can be anywhere from four characters to twenty. But it always starts at position "20" as with "1" in the case of the 1156833. The extension, jpg, is of no value.I might also add my programming ability is close to nonexistent.
My form uses the city table as a drop down look-up field. In the form it show’s up correctly by showing the City Name only.
The problem is that I have a command button that looks up the city in the form as part of an address lookup for Mapquest, but the value it retrieves is the numeric City_ID and not the City Name. How can I fix it to see the correct column?
I am a buyer and I'm attempting to create a query in Access 2003 that will list all of my vendors (20 in total) and their top 10 selling sku's. Here are the fields I am using:
Buyer_Code Supplier_Number name Sku_Global OEM_Number Part_Description_English Status C_Last12_SLS_QTY
I have created one Query including all of the above fields as well as the following field, "XP1: GetTen([Supplier_Number])" In this query I have set "Supplier_Number" to sort ascending and "C_Last12_SLS_QTY" to sort descending.
I then created a module, written as follows:
Option Compare Database Option Explicit Public wSUPPLIER_NUMBER As String Public wNum As Integer
Function GetTen(SUPPLIER_NUMBER) As Long If wSUPPLIER_NUMBER = SUPPLIER_NUMBER Then wNum = wNum + 1 Else wNum = 1 End If If wNum > 10 Then GetTen = 0 Else GetTen = wNum End If wSUPPLIER_NUMBER = SUPPLIER_NUMBER End Function
I then created a second query with all of the above fields, and the criteria for the XP1 field as ">0"
As far as I can tell, this should bring me back a list with the first 10 rows for each of my Supplier numbers... unfortunately it is for some and for others it's bringing back more than 10 rows. The other problem is that it seems to be picking random rows to bring back, and not just the first 10 (which because in query1 I set the C_LAST12_SLS_QTY field to sort descending, should be my top 10 selling sku's).
Does anyone have any idea as to what I've done wrong? I'm pretty new with Access so I may be missing something pretty simple.
I am trying to add hours entered in a short time format. For example 08:15 or 02:55. I also would like it to give a total number of hours beyond 23:00. Here is a table with a Name Column and Hours Column
A) write a query to add up the hours. I believe Heather would total 25:31 Hours.
B) Show this same total in a report? In my report I had a Name Footer which showed "=Sum([hours])". Will this work once the query is right or will I use the "=Sum([totaltime])"?
Also, is it possible for you to respond in a SQL statement so that I can copy? Thanks.
I have a report (report1) which is based on a single query (query1).
There is a second query (query2) which returns just a single value (say 100) and I want the result of the query2 to appear at the bottom of the report1. The query2 is not related to the query1 so I cannot join them.
When I insert a text box in the report1 and choose the query2 from the control source Access gives the error, "The Microsoft Access database engine does not recognize '' as a valid field name or expression".
I'm fairly new to Access and I'd appreciate some help. I've built a form with buttons to open new forms for that specific record (based on queries as all the data is held in a single table). This works fine until I try to add new records. At the moment the only way I can make this work is to add the new record, shut the original form before re-opening it and proceeding on to the other sections (via the buttons I mentioned).
If anyone could tell me how to get Access to save the record before it opens the other forms I'd really appreciate it.
I want to present some data in what seems to me like it would be a very natural and normal format, however have so far been unable to figure out how to do it.I record attendance data for a children's after school club in a table as follows (simplified):
AttendanceID - autonumber AttendeeName - text AttendanceDate - date Attended - True / False
The data looks like this in the table. I would like to be able to easily see who attended on which days, so I would like to therefore see the data laid out like this:
The Crosstab query looks almost like it would do what I wanted, however it seems to insist on adding something up, rather than just showing me the value true or false.
Help...I am new to Access and am trying to get a query completed to run a query on contract end dates. My goal is to be able to run the query on a date such as 10/2007 and have it pull all contract end dates that would term for the month of October, 2007. I have been pulling my hair out trying to build expressions and sifting through my access books to no avail.
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.