I am working on a database that will notify technicians if they have orders that have been placed on back order. The technician can enter two kinds of orders, one for a specific job and one to replenish the stock in his truck. My manager has asked that I create separate reports for each kind of order and e-mail them to the technician. Is there a way to program Access to send an e-mail with two separate attachments?
I would also like the e-mail to send without the user needing to click the Send button. Is that possible? The database will be sending twenty plus e-mails each time the button is pressed, and I would like to avoid needing the user to click the Send button that many times.
I currently have a code set up which sends an attachment from a drive on my computer to all the email addresses in a certain query. I would like to change the code so that I can add a button that will allow me to send an email with a specific attachment depending on their individual code in a table, e.g each person will receive a specific attachment. At the moment, the attachments are saved with the same file name as the person's specific code.The code I am currently using is:
Private Sub Command9_Click() Dim MyDb As DAO.Database Dim rsEmail As DAO.Recordset Dim qdf As DAO.QueryDef Dim prm As DAO.Parameter Dim strEmail As String Dim strMsg As String Dim oLook As Object
I have a database which has several records with at least 5 documents needing to be attached to each record. Using attachments or OLE would cause considerable bloat, so I opted for hyperlink fields for all the document types necessary to save with each record. However, now I am faced with an issue. It is easy enough to write code to open the files by following the hyperlinks, as well as write code to send an email, but how would I go about combining the two? I need to write a code that will attach these documents to an email, as attachments and not as hyperlinks. I know with excel documents, I could follow the hyperlink and send the document by email through excel, but I also have images converted to pdf's that need to be sent as attachments.
I have some code that attaches any files that are in my attachment field on the current record in to a email this is great but I m starting to realise that this is take up way to much space as it hold a copy in the database and can t afford to go down the sql sever route so what I have done is added some new fields called path1, path2 ,path3 ,path4 and path5 now the user can add the files location to these text box instead of add them via the attachment field also I can now limit number attachments to each record
Code: Private Sub cmdEmail2_Click() Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Dim OutlookAttach As Outlook.Attachment Set appOutLook = CreateObject("Outlook.Application")
[Code] ....
Some how I need to change this so it checks fields path1 path2 path3 path4 path5 on the current record and see if anything is entered in these textbox's and follow the paths and attach the files to email
How to make command button . How to add a file path to a text box
1. add new field to your table e.g "path1" 2. add the new field to your form 3 create new command button call it addpath 4 add code below to click on event
Code: Private Sub addpath_Click() Dim fDialog As Office.FileDialog Dim varFile As Variant ' Clear listbox contents. ' Me.Path1.Value = "" ' Set up the File Dialog. '
[Code] ....
This will now save file location path to the path1 text box. To open file path
1.add another command button call it "pathopen" 2. add code below on click event
Code: Private Sub pathopen_Click() Application.FollowHyperlink Me.Path1 End Sub
I am setting up a database to track preventative maintenance required for testing equipment in our repair shop. Some of my associates would like to be able to send e-mail notifications via the database when maintenance is due. I set up a query to show the people who need to receive an e-mail and a query to show the maintenance each person needs to perform.
Each person will need to perform more than one maintenance step each time. I would like to get it so that the database will loop through the first query and generate one e-mail for each person. I would like the e-mail to list all the steps that person would need to do (as shown in the second query). I know this would require setting up loops and I'm afraid I'm not very good at writing loops.
I think this will need two loops. One to loop through the first query to see all the e-mails that will need generated and one to loop through the actions to be included in each e-mail. The person's name is included in both queries and can be used to set up a link between the two.
I have a Database with a field that holds several attachments. I want to make a command button for a form that will open the attachment window that pops up when you double click on the attachment in the table. attach_fig7(1).gif.. I'd like the above window to open when I click the command button.
I have some code that takes from a query, an email address and sends out an email.Due the security warning that happens for each individual email, i want to create ONE email for all email address in the query and populate them to the BCC section of the sendobject.Here is the code that I currently use
Code: Private Sub cmdSendEmail_Click() Dim MyDB As DAO.Database Dim rsEmail As DAO.Recordset Dim sToName As String Dim sSubject As String Dim sMessageBody As String
[code]...
I want to populate the BCC field with multiple emails addresses seperated by ":" and send just one email.
I have inventory database, in database there is "NextScheduledMaintenance" field, I want access to send email automatically when scheduled maintenance date due.
I am creating a database that needs to store a large number of pictures. I have a component that we're working on that needs 100 photos of specific details taken and stored.
I have created two separate tables.
One that includes four fields, ID, Component Number PhotoType and an attachment field.
The second table has ID,Photo Type and in this table I've coded 100 records detailing the photos I need. This is used as a lookup field for the first table.
What I would Like to accomplish from this point is to be able to add 100 fields onto the form for the user to click on the attachment and then save the specific photo that corresponds. How do i edit the control source of the attachment item on the form so that it is specific to one component number, and one phototype?
I would like to send an email from Gmail server automatically at the end of every month. I'm currently sending email on button click. But is it possible to do this without user intervention.
I'm working on a database for work that email's the current record after the form is completed. I have a attachment field in the table called Photo and some record's have a photo attached and other's don't. The code below works great with records that have a photo attached, but I get a path not found if I try to email a record that does not have a photo. I know that I need to put some form of code to check the photo field for a attachment, but I'm having a brain fade as to just what the code is.
Code: Private Sub eMail_Report_Click() Dim oFilesys, oTxtStream As Object Dim txtHTML As String Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem
First, I'm developing both the Front End and Back End in Access 2007, and I intend to distribute the application using the Access Run Time. The powers that be will not let me use SQL Server.
The database is required to house attachments. Initially, I had created a separate back end database to store the attachments, but the file would quickly grow beyond the 2GB limit - roughly within 3 weeks. Instead, I decided to save the "attachments" in folders (named after the parent records PK ID) on the network. Using VBA, I would populate a list, based on the parent record, from which the user could select the file, do what needs to be done, then save it.
Unforunately, we're running into data security issues - all of the attachments will have private personal information - SSNs, Loan Numbers, Account Numbers etc., so they need to be stored in a location that's not universally accessible. All of the users have different permissions based on their department, acting as a very basic security level (i.e., Department 1 users will not be able to view any parent records associted with departments 2 or 3).
So I need a way for my back end to take a file located in a separate directory not normally available to the Front End User, then move that file (or save a copy that will be overwritten when re-attached to the record) to a location that IS accessible to my Front End User.
Can I create/use modules stored on the back end?
My first thought is to let the back end store the record in a temporary attachment table that is deleted when the user is done with it, but I've noticed that Access has trouble reclaiming the space when the attachment is ultimately deleted once the user is done using it, and I'll run into my 2GB limit again.
Alternatively, I could create a new .accdb file each time the record's attachments need to be accessed, and then delete that database once it's done and the attachments are returned to the secure location, solving my limit problems.
I am making a new database. And I want to confirm that I can do all the following in Access 2007 and how is best to do it.
1) A form where I can define:a unique Email Number starting at 1. a directory eg "C:UsersPaulDesktop101 - Brick House" an email address. a Recipient Name a Category for the email. Choosing either "Working" or "Complete". This would be part of the email subject.
2) a button which onclick lists all the files in the defined directory to a box on the form.
3) a button which onclick exports a report containing the list of files to PDF. Then attaches a zip of these files and the PDF report to an email in Outlook for revision before sending.
4)In Outlook the subject would be:
"The Directory Name" - "The Category" - "The Email Number" "101 - Brick House - Working - Email 1"
5)In Outlook the body would simply be the subject of the email followed by the filenames of the 2 attached files, ie the PDF report and the zip.
Dim dbs As DAO.Database Dim rsQuery As DAO.Recordset Set dbs = CurrentDb Set rsQuery = dbs.OpenRecordset("myQuery") Set rsImage = rsQuery.Fields("Images").Value While Not rsImage.EOF rsImage.Fields("FileData").SaveToFile "C:UsersmyNameDesktop" rsImage.MoveNext Wend
i want to crate a continuous form where i can add a button to export all of the attachments in that current record, i can create a folder and name it same as the selected record but how I can export all of the attachments in that record
Code: Dim strUserName As String Dim Location As String strUserName = Environ("UserName") Location = "C:Documents and Settings" & strUserName & "Desktop" & Me.ID If Dir(Location, vbDirectory) = "" Then MkDir Location
I'm trying to store files on a linked SQL Server table, much the way I would using the Attachment data type in Access. (I couldn't use the Attachment data type, though, due to size restrictions - we're storing about a gig a week.)
Almost everyone says to store the attachments on a file system and save the location - I can't do that because of varying permissions. The files HAVE to be stored in the SQL Server table for security reasons.
So how do I do it? I've tried converting the files to binary and updating the recordset that way, but it always comes back as null. I'm not sure what I'm doing wrong.
Code: Public Function Test(strFile As String) As Boolean Dim rsAtts As dao.Recordset Dim ifilenum As Double Dim btAR() As Byte Set db = CurrentDb
Currently, I'm taking my unread emails, storing them in a table then sending any Excel files to a specified folder I've modified some code I found while surfing and it works great but I'd really like to send the attachment name and file path with the email recordset. It's been a long day so maybe it's super simple. Below is my code. Office 2010 Windows 8.1
PHP Code:
Function ReadInbox() Dim TempRst As DAO.Recordset Dim OlApp As Outlook.Application Dim Inbox As Outlook.MAPIFolder Dim Atmt As Outlook.Attachment Dim InboxItems As Outlook.Items
How to add attachments to a email using a sub form were I store the attachment paths
E.g I have a main form called frmteaminfomer with various fields and continuous subform called attachmentssubform in the sub form I have a field call txtaddress . I have some code that I can pick a file then put its file path into txtaddress field and also have a check box call add to email. so what I trying to do is loop through all the records in the subform and if the check box is true add the files as attachment on the email.
I am creating a recruitment db for 6 members of staff, I have created a form (add new vacancy). Within the form is a various drop down boxes where you can select each employee and drop down box to pick which company want a vacancy filling. What I wanted to do is when a new vacancy is put on the system, and the administration team select save record is it possible to email the employee to let them know a new vacancy has been added, and also email another administration department to send the employee a suitable candidate list with the information provided on the form. Or am I asking far to much from access. The two fields that are most important is who the vacancy belongs and which company want the vacancy. The db is available if you require a look to have a better insight. Thanks for all your help.
I maintain a simple Access database which about 30 other users have open every day and use it solely as a reference book. It is simply a large reference 'toolbox' with one form and many many sub reports in the form with links to refference guides for my users. Very often I need to add new reports and just new content overall to the database. My current process is to
1) make a copy 2) modify the copy with all my new content 3) Send and email with the file attached telling all 30 users to delete their old database and use this updated version.
Of course we have many issues including:
1) The files are very large in Lotus notes (is there a way to make these files a lot smaller) 2) Seems like a waste to delete and replace an entire database when only 1 or 2 minor links need to be changed every time. Is there a macro or some code I can create that would act as a patch where the 30 users can run the code and it will change hyperlink paths that I needed changed, report content or anything that needs changing.
gets around having all my users copy and replacing their database toolbox on their desktop. We all work out of a shared network drive so I can have them use the database together in a shared drive but its litterally impossible to have every hand out of the database all at once so I can go in and update, it just does not happen so if there is a work around for getting all users out of the DB, it could avoid having to do anything else.
What I have is a table that contains plant info (plants that produce a product not vegetation plants). I also have a table that contains all the fields related to the products themselves. Finally I have a third table that contains the constituent items that make up products (think raw ingredients if you will). I have various junction tables set up to define relationships between all these.
What I'm trying to do is create a way of inputting a product and having an option on the form to send that product information to multiple plants. I don't know why but I cannot visualize an approach to doing this.