473,471 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

email right click

347 Contributor
i have to set up a access database with details of mp3s held on company server with the facility to search them, i need to know if it is possible to right click on a found mp3 in the database and send the file it lists by email just like you can with an image on a website thanks
Nov 5 '07 #1
15 1823
MMcCarthy
14,534 Recognized Expert Moderator MVP
i have to set up a access database with details of mp3s held on company server with the facility to search them, i need to know if it is possible to right click on a found mp3 in the database and send the file it lists by email just like you can with an image on a website thanks
Access does not have an on right click facility.

Your options would be to use the on click, on double click event or a command button. You can then use the send object method to send the information by email.
Nov 8 '07 #2
colinod
347 Contributor
where do you set this up from i amm very new to using access for this
Nov 9 '07 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
where do you set this up from i amm very new to using access for this
I'm speaking of vba.

If in form design you right click on the textbox containing the data and open properties then look under the event tab you will see a list of the "events".

Choose an event (like On Click) and click on the little arrow to the right. Select [Event Procedure] from the list. Then click the button to the right with the dots. You would add your Send Object code to the blank event procedure that appears.
Nov 9 '07 #4
colinod
347 Contributor
thank mmcarthy i have tried what you said but im afraid i have never used vba before i get as far as the input code point but im not sure what to put or exactly where, this is what i have so far

Option Compare Database

Private Sub Command8_Click()
On Error GoTo Err_Command8_Click


Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Command8_Click:
Exit Sub

Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click

End Sub

Private Sub filename_Click()

End Sub
Nov 9 '07 #5
MMcCarthy
14,534 Recognized Expert Moderator MVP
OK so in Private Sub filename_Click() try something like the following:

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Private Sub Command8_Click()
  5. On Error GoTo Err_Command8_Click
  6.  
  7.  
  8.     Screen.PreviousControl.SetFocus
  9.     DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
  10.  
  11. Exit_Command8_Click:
  12.     Exit Sub
  13.  
  14. Err_Command8_Click:
  15.     MsgBox Err.Description
  16.     Resume Exit_Command8_Click
  17.  
  18. End Sub
  19.  
  20. Private Sub filename_Click()
  21.  
  22. DoCmd.SendObject ObjectType:=acSendNoObject, _
  23. Subject:="mp3 details", _ 
  24. To:="Tom Jones", _
  25. EditMessage:=True, _ 
  26. MessageText:=Me!filename
  27.  
  28. End Sub
  29.  
Nov 9 '07 #6
colinod
347 Contributor
this is not quite what i was looking for i was hoping for it to be sent using outlook or outlook express so we could enter an email address etc thanks anyway
Nov 9 '07 #7
MMcCarthy
14,534 Recognized Expert Moderator MVP
This will open outlook or outlook express. Just change 'Tom Jones' to whatever email address you want. For example ...

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Private Sub Command8_Click()
  5. On Error GoTo Err_Command8_Click
  6.  
  7.  
  8.     Screen.PreviousControl.SetFocus
  9.     DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
  10.  
  11. Exit_Command8_Click:
  12.     Exit Sub
  13.  
  14. Err_Command8_Click:
  15.     MsgBox Err.Description
  16.     Resume Exit_Command8_Click
  17.  
  18. End Sub
  19.  
  20. Private Sub filename_Click()
  21.  
  22. DoCmd.SendObject ObjectType:=acSendNoObject, _
  23. Subject:="mp3 details", _ 
  24. To:="Tom.Jones@yahoo.com", _
  25. EditMessage:=True, _ 
  26. MessageText:=Me!filename
  27.  
  28. End Sub
  29.  
Nov 9 '07 #8
colinod
347 Contributor
sorry to be pain but i have tried this and am getting the following in an alert box

The expression On Click you entered as the event property settign produced the following error:Ambiguous name detected:Command8_Click
* The expression may not result in the name os a macro, the name of a user defined function, or [event procedure]
*There may have been an error evaluating the function, event, or macro
Nov 9 '07 #9
colinod
347 Contributor
its ok i have sorted it i made the mistake of not replacing the whole script thanks
Nov 9 '07 #10
colinod
347 Contributor
ok i have got it to open the email but i am trying to attach an mp3 file from a folder in our network have you got any ides an this maybe the way it is written in the access database
Nov 9 '07 #11
colinod
347 Contributor
Hi all

The code used also adds the mp3 just as text in the message and not as an attachment????
Nov 9 '07 #12
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi all

The code used also adds the mp3 just as text in the message and not as an attachment????
Sorry I misread your original question. Attaching something that is not a database object like an mp3 file will require much more complicated code.

To see what I mean have a look at these two other questions for two ways of doing this.

http://www.thescripts.com/forum/thread706529.html
http://www.thescripts.com/forum/thread553562.html

Mary
Nov 9 '07 #13
colinod
347 Contributor
Sorry im afraid i just do not understand the codes its beyond me at the moment????
Nov 9 '07 #14
MMcCarthy
14,534 Recognized Expert Moderator MVP
Sorry im afraid i just do not understand the codes its beyond me at the moment????
In all honesty I think it is. You need to get a good grounding in Access and VBA before attempting something this complicated.
Nov 9 '07 #15
colinod
347 Contributor
ok thanks anyway i will go back to trying to do it with a web form and asp
Nov 9 '07 #16

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

Similar topics

5
by: cfoley1970 | last post by:
I have an online directory of alumni from a high school that runs PHP with a MySql backend containing contact info, email addresses, etc. Some of the alumni have begun to complain about receiving...
1
by: JSzucs | last post by:
I wrote a little code snipet in Asp.Net to send a default message to my outlook email address. That works fine, since the SMTP virtual server default domain is same domain as my outlook mail...
4
by: Tom Petersen | last post by:
I am using ASP to send the user an email with a clickable link that will point back to the record id but I've got one line getting an expected end of statement that I can't figure out... &...
1
by: Dhruv | last post by:
1. I'm trying to get the notifications working on the scheduled jobs. I want to email me when the job fails. I created an operator (dmalhotr) and given me as the email address. Here is the...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
7
by: Randel Bjorkquist | last post by:
First, I'm extremely new to C# and the Microsoft Visual Studio IDE. I am in the middle of writing a small web application that communicates to a database server and sends out email confirmations. ...
0
by: Joey Liang via DotNetMonster.com | last post by:
Hi all, I have this error on Unable to relay for xxx@gmail.com .I know to solve this error i have to Go to your IIS Right-click ur SMTP and in it properties Then Click Access Tab
6
by: \jason via DotNetMonster.com\ | last post by:
currently i am doing a personal website and keep on changing the aspect... finally the finall decision is to have a login page (requirement in asp.net, vb.net) and the login with security part of...
11
by: Terry Olsen | last post by:
How can I catch a right-click on a DropDownMenuItem?
0
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...
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,...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.