I would like to be able to place a button on my invoice form that will allow me to e-mail the individual invoice to the person being billed (the e-mail address is included on the form). I created a macro that works to send a PDF file of all of the records and I am having trouble figuring out how to send just the current record. I would also like to have the e-mail address automatically populated based on the e-mail address on the current record.
I've created a button on my ACCESS 2010 form that will send a PDF via email. However I only need to send the single record displayed on the form not all records.
The on click command of the button sends the PDF of the report. (I read that this is what should be sent; but still get the same results.)
I don't understand how and where to attach VBA code:
I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:
Code: Private Sub Command33_Click() Dim strEmail As String Dim strMsg As String Dim oLook As Object Dim oMail As Object Set oLook = CreateObject("Outlook.Application") Set oMail = oLook.CreateItem(0)
[code]...
There are two issues I keep running into:
1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.
2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is: one paragraph a blank line a hyperlink to a website a blank line another paragraph
I've searched high and low on this forum on a step by step on how to do this and everyone's answer is either vague and assumes everyone is an access wizard, or really complex and codey and assumes every one is an access wizard!
I have a "lead sheet database" and I need to add a button on the form which emails just the contents of that current record. My company still handwrites these lead sheets and faxes them to consultants so I'm trying to bring them into the 21st century! An uphill struggle. I'm a code and VB newb by the way.
I've tried sending the form to a report as other posts suggest, but I get an error message about there being too many fields. So I'm stuck. All I need is for each form record to be emailed to a different consultant each day.
(I've had to rar then zip the database file due to size restrictions. I couldn't get the files size down enough by just zipping.)
I need to Print a single record from a form but using a report layout.
I have created the form and created a report. A button on the Form kciks off the print but I get all records rather than just the one shown on the Form. Whats a really simple way of just selecting the Current record.
Where do I put an instruction saying print only this record:confused:
I need to find a way to print the currently selected record (by clicking a button in the form) as a form. I know printing is almost always done in records, but they use the forms by hand before entering them into the computer database.
One tough part of this is that this printing function needs to be sustainable through revisions of the form, as we will be constantly updating it.
Is there a way to print the form with only the current record shown without creating a second form or report?
I have searched this forum and found a few examples but cannot get them to work in Access 97, what i would like to do is email a single record by using a query for Repair No..
So i would like it to be a button, it's possible to do this via a sendOject command but that emails ALL records not give a option to type in your repair number and email that...
Thanks for any one who can help, im a complete noob an dneed some help
I need to save a single record (preferably the current record) as a PDF. I have created a form for my boss to calculate bids. He wants to save each record individually as a PDF to upload into our service software program to attach to client files. I can save a selected record as a PDF if I print the selected record first. We need to eliminate having to print it first as it is just a waste of paper and an unnecessary step. I am kind of thinking that VBA and attaching that to a control button on the form is the way to go, but I am new to writing code and I am completely confused!
I have a continuous form based on a orders table and a details sub form.I list all the records in a continuos form in date of order.i need to change the colour of a single record based on the condition of a tick box on the original orders form
I'm currently working on a database which requires invoicing as a part of it. The invoicing is done based on quarters, and I want the users to be able to use a multiple items form, listing all of their clients, to create the invoices. Each invoice must be created individually so they can be e-mailed to the client, and saved to the clients folder. So I was wondering if it would be possible to create individual invoices for clients using a multiple items form.
I have a query (Access 2007) that contains a field named "email" (which contains email addresses, of course). I want to email everyone in the query and they are all going to receive the same message. My email to them doesn't have to be personalized and I don't need to collect data from the recipients. I don't even need a reply to the email I send.
What is the best way to impliment a query in a form so that the user can view the query records, and have the option to print or save the selected record using command buttons?
I tried subforms but I could not get the command buttons to work in the subform after it went into the form, it wanted to print the entire form instead of the selected record from the subform.
So in a nutshell I have 3-4 queries that are built, and I want to have them show up on my form in a format that the user can scroll through the results and select a single record of the results and then print or save that individual record from the form, if such a thing is possible.
I have a situation where two clients will be using the same database design - one of them will be sending information from his database for the other client to add to their database.
This will be on a record by record basis. The form that has the info entered into it also has a subform.
How do I export a single record between databases that have the same fields? I know how to export a table, but not a single record. The fact that the record that needs to be sent is from two tables (ie the main form and the subform that collects the data for those tables) further complicates things for me. Any ideas? :eek:
Private Sub jobdatebox_GotFocus() Dim dteFormDate As Date dteFormDate = CDate(InputBox("Enter the date:", "Date Entry")) Me.jobdatebox.SetFocus Me.jobdatebox.Text = dteFormDate
the above code pops up an alert and asks the user to enter a date. this value is then stored in the jobdatebox control (jobdate field)
the jobdate field is a Date/Time datatype and is the first item on my form so when the form opens this pop up appears instantly (which is fine)
they enter a date as the following: 6 6 and it displays as 06/06/2006
my user tabs through the fields, inserting a record.. when they reach the last field.. and tab again (to enter another record)
the pop up alert appears again..i dont want this.. i only want it to pop up the first time (when the form is opened) and then just keep that value in the jobdatebox for the remainder of the form's open session
i need something that does the following..
on new record creation jobdatebox.value = dteFormDate (the value entered previously)
OR
Private Sub jobdatebox_GotFocus() Dim dteFormDate As Date dteFormDate = CDate(InputBox("Enter the date:", "Date Entry")) Me.jobdatebox.SetFocus Me.jobdatebox.Text = dteFormDate for all records entered until form closes
OR
just before new record is created if jobdatebox = not null (has a date value inside already) then newrecord.jobdatebox = previous record jobdatebox.value
OK - bit of a newbie here & maybe this question has been asked a thousand times but i can't find any answers that cover this question properly.
Basically i am writing an access database that stores contract information, contact details, orders etc etc. I want to take the Order Number field, along with the Client Name & Address etc and post it into a Word Mail Merge type document, then save that file as ordernumber.doc after checking to see whether it already exists.
I have successfully managed to send the information into word in a mail merge document & get it to save the file using the ordernumber.doc format, however it is saving it to mydocuments folder and i want it in a subfolder called orders (that does exist). It is also not checking to see if that file already exist and overwrites it if it does.
I want to change the path to where the file is being saved, check whether it exists already, then ask me whether i want to overwrite it or save as something else.
Any help would be most appreciated. BTW I am using Word & Access 2003.
*****THIS IS THE CODE I AM USING***** Private Sub NewEternit_Click() On Error GoTo NewEternit_Err
Dim objWord As Object
'Start Microsoft Word. Set objWord = CreateObject("Word.Application")
With objWord 'Make the application visible. .Visible = True
'Open the document. .Documents.Add ("\shentcDocuments and SettingsJohn.SHENTMy DocumentsTemplatesEternit Order Merge.dot")
'Move to each bookmark and insert text from the form. .ActiveDocument.Bookmarks("orderno").Select .Selection.Text = (CStr(Forms!frmOrderDetails!ContractNo) & "/" & (Forms!frmOrderDetails!OrderNo)) .ActiveDocument.Bookmarks("Date").Select .Selection.Text = (CStr(Forms!frmOrderDetails!Date))
'Print the document in the foreground so Microsoft Word will not close 'until the document finishes printing. 'objWord.ActiveDocument.PrintOut Background:=False
' Save the file using orderno field Dim FName As String FName = Forms!frmOrderDetails!OrderNo & ".doc"
'Quit Microsoft Word and release the object variable. 'objWord.Quit 'Set objWord = Nothing
What I'm try to do is attach any files from the attachment field from the current open record to email i have some code i have manage to get files from the open record to save to destination /temp folder to work so outlook can attach the files but outlook is not opening or putting them in to email also have problem's that i have highlighted in the code in red.
Code: Private Sub cmdEmail2_Click() Dim outlookApp As Outlook.Application Dim outlookNamespace As NameSpace Dim objMailItem As MailItem Dim objFolder As MAPIFolder Dim strAttachementPath As String
On our main menu table, I only want to be able to add one record.
On the form that I have linked to this table, should you press the tab key to go through all the items / buttons, it opens a blank record screen. However, I do not want this. Any ideas?
I have 2 tables and a query to show the details of both tables on a form for an attendance database. The idea is that whenever someone is absent they have a record created.
tbl[Staff] has the following fields StaffID,Name,Team,Job Title tbl[Absence] has the following fields StaffID, abStartDate,abEndDate,abIssue
I can set up the query to find the member of staff by name but I want to be able to use this form to add new records to the Absence table for each individual. eg I use the query to search for "Joe Bloggs" and the form shows the details from staff table and then use the form to add details to the Absence table.
I have 2 tables and a query to show the details of both tables on a form for an attendance database. The idea is that whenever someone is absent they have a record created.
tbl[Staff] has the following fields StaffID,Name,Team,Job Title tbl[Absence] has the following fields StaffID, abStartDate,abEndDate,abIssue
I can set up the query to find the member of staff by name but I want to be able to use this form to add new records to the Absence table for each individual. eg I use the query to search for "Joe Bloggs" and the form shows the details from staff table and then use the form to add details to the Absence table.
Hi, I am trying to run an append query, but instead of appending the whole table, I would like to only append a single record.
I have an append query, and it works like a charm. I can also get it to work with prompting the user for a parameter (in my case LeaseId which is a primary key). When the user is prompted and enters the LeaseId it only appends the single matching record. Works like a charm.
However, I don't want to prompt the user for the paramater. I want the user to generate the LeaseId based on the selections in two combo boxes.
So far the I do get the right LeaseId, but I have no idea how to actually pass the LeaseId to the query. I've tried the following, but I know it's completely wrong.