473,394 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Emailing the Actual Database

1
Hi everyone,

I know there's the ability to email the reports from an access database, but I was wondering if it was possible to create a button that would email the actual database. I've done some research on this and haven't come up with anything so I'm not so sure about it being possible or not.

Thanks in advance to any help you can provide,
Lozzo
May 14 '07 #1
2 1664
ADezii
8,834 Expert 8TB
Hi everyone,

I know there's the ability to email the reports from an access database, but I was wondering if it was possible to create a button that would email the actual database. I've done some research on this and haven't come up with anything so I'm not so sure about it being possible or not.

Thanks in advance to any help you can provide,
Lozzo
To the best of my knowledge, you cannot E-Mail the actual Database itself via the SendObject() Method. Your best best would be to Zip the Database, (should get a high Compression Ratio), then send it as a File Attachment.
May 17 '07 #2
MSeda
159 Expert 100+
these are some macros I use to zip and send a backend data base from a command button in the FE.

Expand|Select|Wrap|Line Numbers
  1.   Sub ZipnSendUpdate(myPath As String, mySource As String, myName As String)
  2.  
  3.       Dim FileNameZip, FolderName
  4.  
  5.       Dim strDate As String, DefPath As String
  6.  
  7.       Dim oApp As Object
  8.  
  9.       Dim appOutLook As Outlook.Application
  10.  
  11.       Dim MailOutLook As Outlook.MailItem
  12.  
  13.       Dim myRecip As String
  14.  
  15.  
  16.  
  17.       DefPath = myPath
  18.  
  19.       If Right(DefPath, 1) <> "\" Then
  20.  
  21.           DefPath = DefPath & "\"
  22.  
  23.       End If
  24.  
  25.  
  26.  
  27.       FolderName = mySource
  28.  
  29.       strDate = Format(Now, "mmddyy")
  30.  
  31.       FileNameZip = DefPath & myName & strDate & ".zip"
  32.  
  33.  
  34.  
  35.       'Create empty Zip File
  36.  
  37.       NewZip (FileNameZip)
  38.  
  39.  
  40.  
  41.       Set oApp = CreateObject("Shell.Application")
  42.  
  43.  
  44.  
  45.       'Copy the files to the compressed folder
  46.  
  47.       oApp.NameSpace(FileNameZip).copyhere oApp.NameSpace(FolderName).Items
  48.  
  49.  
  50.  
  51.  
  52.  
  53.           Do Until oApp.NameSpace(FileNameZip).Items.Count = oApp.NameSpace(FolderName).Items.Count
  54.  
  55.           DoEvents
  56.  
  57.           Loop
  58.  
  59.  
  60.  
  61.           Set oApp = Nothing
  62.  
  63.  
  64.  
  65.   Set appOutLook = CreateObject("outlook.Application", "localhost")
  66.  
  67.   Set MailOutLook = appOutLook.CreateItem(olMailItem)
  68.  
  69.  
  70.  
  71.   myRecip = ELookup("[Employee Email]", "[Employee Table]", "[Receive Data Update] = YES AND [Employee Location] <> '" & myLoc & "'")
  72.  
  73.  
  74.  
  75.   With MailOutLook
  76.  
  77.   .Subject = Format(Now, "mm/dd/yy") & " Data Update"
  78.  
  79.   .body = "Attached please find the daily data update"
  80.  
  81.   .To = myRecip
  82.  
  83.   .Attachments.Add FileNameZip
  84.  
  85.   .Send
  86.  
  87.   End With
  88.  
  89.  
  90.  
  91.   End Sub
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.   Sub NewZip(sPath)
  100.  
  101.   'Changed by keepITcool Dec-12-2005
  102.  
  103.  
  104.  
  105.       If Len(Dir(sPath)) > 0 Then Kill sPath
  106.  
  107.       'Create empty Zip File
  108.  
  109.       Open sPath For Output As #1
  110.  
  111.       Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0)
  112.  
  113.       Close #1
  114.  
  115.  
  116.  
  117.   End Sub
  118.  
  119.  
newzip is something I actually found on excel site, it is pretty generic and should work as is. ZipnSend is tailored to my application so you'll need to tweek it to use in your app.
May 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jonathan M. Rose | last post by:
I am looking for a script that I can sit on an HTML server (Linux, Apache, PHP/Perl/Python/Etc.) that will allow me to do the following things: 1) Post news articles that consists of (i) a title...
2
by: Paul Hudson | last post by:
Ive developed a web based system where somebody can add a news record using ASP and MS Access database connectivity. The new record is inserted into the database and then a formatted email gets...
2
by: Chuck | last post by:
I have a database that has a table in it with employee information (name, dob, email, etc). This is joined to a table that has tasks that are assigned to each individual that has a recurring date....
5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
3
by: Strasser | last post by:
In Access2000 mass emailing worked perfectly (very powerful tool!). Doesn't work when using XP version of both Access and Outlook, even though I checked the box to ensure that I was sending the...
4
by: Mike Moore | last post by:
What is the best way to launch outlook from an asp.net web page? Can you do this using MAPI or is there a control that you can purchase? We are unable to use SMTP. We use MS Exhange and MAPI...
1
by: dman | last post by:
Hi, I am a total newbie to asp.net. I have spent the last week or so trying to find a good tutorial that would show me how to create a form that would be entered into a SQL database and then...
2
by: Tim Hunter | last post by:
I have two questions regarding emailing from Access. My first question relates to how many email addresses is too much. I have a client who wants to email 1500 people at once. Is this possible or...
20
by: paul814 | last post by:
I've been working on this for some time now and have gotten nowhere...hoping someone here can help. I want to take and email all records in a database for the current date when this php page is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.