473,699 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Emailing the Actual Database

1 New Member
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 1681
ADezii
8,834 Recognized Expert Expert
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 Recognized Expert New Member
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
1470
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 and (ii) a body. 2) Show the last X posts (or, better yet, just the last X titles) on a home page. 3) Show all posts on a "news" page. 4) When a news article is posted, email the news article (with the title being the email subject and the news...
2
1912
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 send to a list of about 30 email addresses using CDONTS. My emailing ASP script works by looping through a recordset containing the email addresses, the text gets formatted, and then it sends, then moves onto the next recipient etc etc ... I...
2
1963
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. For example, Joe must take an annual CPR class, Bob needs to take his Hearing Test, Ann must take her Eye Exam. The task table keeps the completed date in it, while the form that displays it calculates the next due date (using dateadd). So, as...
5
7382
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 Run-time error. When I run it on an XP machine it crashes, but on an NT box it just generates an unknown error, handled by the error handler. I have debugged and stepped through the code and have narrowed the issue to the point at which the...
3
2365
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 email. Any ideas? Thanks in advance.
4
1651
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 currently for our client/server apps.
1
1145
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 once entered into the database would email me the results of the form. I found the tutorials on aspnet101.com (Emailing form results) and they really did not explain to well.
2
2234
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 smart? what would be a reasonable number? My second question is related to emailing customers who have an anniversary or a Birthday. Is it possible to personalize each email with a name? TIA Tim
20
1917
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 run. Now I have a number of tables in this database...looking like this: editorial editorialdate, editorialname, editorialcomments press
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.