473,836 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email Item as Link from Access

2,322 Recognized Expert Moderator Top Contributor
I know how to create email from within Access, using outlook automation.
User has the access frontend installed
Office 2003

Is it possible to create a hyperlink in a email that will accomplish the following, when receiver clicks it:?

Open the access front-end on the users PC.
Open relevant form
Goto relevant Item

If its not possible in the way I have described it, I have several modifications that could be acceptable, for example, it would be ok to require that the user has the frontend open when clicking the link. It would also be ok if I had to install a add-on to the users outlook.
Jan 19 '12
54 14410
8,834 Recognized Expert Expert
@TheSmileyCoder :
Your Syntax is incorrect,
Expand|Select|Wrap|Line Numbers
  1. /x MacroName
Jan 19 '12 #11
32,584 Recognized Expert Moderator MVP
Line #7 seems closest to what I'd expect - although three slashes after FILE: surprises me. I'd expect two. Anyway, try the quotes around the filename part only. It would need these I think, due to the spaces in Documents and Settings. Alternatively, try replacing those spaces with %32, as you sometimes see in links to items which have embedded spaces.

I'm running tests to see what happens when you try to include a link to the server file (in UNC notation) in the body of the email. I managed to send an email with the link from GMail, but how Outlook handles it is still unclear. I'll update later when I know more.
Jan 19 '12 #12
32,584 Recognized Expert Moderator MVP
I was able to send an email from Outlook (manually mind) with a hyperlink value of (something equivalent to) :
Expand|Select|Wrap|Line Numbers
  1. file://MySvr02/Home/MyName/Copy%20of%20Test.CMD
NB. Only two slashes (/) after file: - and the space is %20 not %32. It seems it uses Hex rather than decimal values for the codes.

When it arrived I was able to follow the link (to "\\MySvr02\Home \MyName\Copy of Test.CMD") but I was prompted to confirm that I was happy to allow it to run. The CMD file ran fine.
Jan 20 '12 #13
446 Recognized Expert Contributor
Smiley's original requirement was to
Open the access front-end on the users PC.
Open relevant form
Goto relevant Item
I don't believe this can be done with either a Hyperlink or a command line argument. You can open the database and display the default form,ok if that's the form you want to display, but you still cannot go to a specific record.

One dodge I use is to to have my default form hidden (actually it has no features and matches the background 'cos it running a timer to fetch the prefered language from the user's login to then setup the correct Menu Bars /Ribbon)

Instead of doing this it could run an import routine to bring two fields (presumably a form-name and an item-number) from the email attachment into a local table, whereupon it could open up the said form and item.

A bit fiddly but not too difficult and a bit dependant on the email attachment. The simplest way would be to transfer the command line as you have been discussing but then a separate 'datapackage' in either a .xls or .mdb format. You could then use either DoCmd.TransferS preadsheet or TransDatabase. However, if the whole thing was to be included in a BAT file then you would have to do a sequential read treating it as a text file, then sort out the wheat from the chaff.

Another fiddly bit would be to stop the application from displaying the form/item combination, when in normal use.

Is there any mileage in persuing this rout?
Jan 20 '12 #14
32,584 Recognized Expert Moderator MVP
I don't believe this can be done with either a Hyperlink or a command line argument. You can open the database and display the default form,ok if that's the form you want to display, but you still cannot go to a specific record.
If you check out the article linked in post #6 (Invoking a Database From the Command Line), you'll find that such control is, indeed, possible S7. Otherwise a CMD (or BAT for the dinosaurs) file could be used to do some preparation first, but frankly, I see no obvious need for that as an Access project could do anything a CMD could do.
Jan 20 '12 #15
446 Recognized Expert Contributor
Neither you précised version nor the Microsoft reference http://support.microsoft.com/kb/209207 indicate how you can pass a form-name and an item ID into Access, other than firing-up a predefined macro.

Please could you elucidate futher?
Jan 20 '12 #16
32,584 Recognized Expert Moderator MVP
I'll try to clarify - using the linked article as a reference. It doesn't strictly tell any old database which form to open, but if the database is designed to open a specific form which can interpret the value passed then it can, nevertheless, cause a particular form or piece of code to be given control.

From the section titled Starting Access into a Database:, you will see an item #4 which explains how you pass a value to the database being opened. This database must be designed to open a particular form automatically. That is a prerequisite. How the data passed is formulated is up to the design of the database.

The next section, titled Designing the Database to Handle the Parameter:, illustrates how the database can be designed to determine the value passed and run normally if none is passed, but in a specific way if the value "Auto" is passed. Clearly this logic is designable, so the code could be written to handle all sorts of values including, but not limited to, the name of a form to open.

If more than one value is required then a string containing both, but separated by a character (EG comma (,)), could be processed in the code to separate the items into different variables for use in the code.
Jan 20 '12 #17
2,322 Recognized Expert Moderator Top Contributor
Ive tried more variations with the syntax, but simply can't get it to flow, using a simple hyperlink. Based on the research I've done around the internet, I coming to the conclusion that its not possible.

While NeoPa's suggesting would work, it doesn't really fit my needs. A user could get 10 emails asking him to look at 10 different reviews, and as I understand the solution proposed by NeoPa it would then involve my program creating 10 different cmd files and placing them on the server. Not in itself a problem but what if I have 5 users for each review? They can have their frontend in different locations or even have renamed it. Now part of my program allready records in the backend where the user has the frontend (Because that allows me to catch when some moroon user has used the distribution copy found on the network, instead of using his own copy of the frontend client), so I can handle that situation, but still, that might take us to 50 different commandfiles, for just 10 reviews. And in time the system's intention is to handle roughly 5-10.000 reviews, and I dont like the idea of leaving all those commandfiles out there.

Angle 2
Another angle I have taken is to try to create a shortcut file, and then email the shortcut to the user. No matter which syntax I try, its as if it doesn't read the command parameter, or doesn't open the database at all.

Angle 3
Is there any way of doing this by creating and installing a outlook addon? I really have no outlook experience, so I was hoping maybe some of you had some pointers in that area.
Jan 22 '12 #18
446 Recognized Expert Contributor
Hi Smiley,
I have not read your last post properly nor tried NeoPa's suggestions yet (being the weekend i have to say hello to wifey now and then!) but i've got this test rig working.

Unzip it into c:\test. There are two files an Access file and a spreadsheet. In the Spreadsheet you can nominate a FormName, a FieldName and the field value (I've assumed it's the ID)

In the Access .mdb file there are two Forms called frmTable1 & frmTabl2 (based on Table1 and Table2). The key fields are Table1_ID and Table2_ID. There are only 3 records in each table; ID = 1,2,or 3.

The Access app will open showing the form and record defined in the xls file.

Up to this point it is an acedemic exercise; I'm nor sure it meets your requirements, Smiley. I certainly want to try NeoPa's method again. It's some years since I tried this previously and I'm now starting to get the hang of this programming lark.

Attached Files
File Type: zip Open_A_Form.zip (24.8 KB, 232 views)
Jan 22 '12 #19
2,322 Recognized Expert Moderator Top Contributor
I appreciate the input, but if I wanted to "simply" take a user to a specific point I could store the information in the database. I want to be able to send the user 1 email for each review he has to follow up on. Each email must have its own link/item/somethingy which the user can click to open to that specific review.
Jan 22 '12 #20

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

Similar topics

by: James Fraley | last post by:
I've created a MS Access form and get the exact same results as below? Now, I believe it has something to do with storing EMails, not OLE. I will appreciate any help! --------------------------------------------------------------- I've created a form with an OLE obect linked to a MS Access OLE Object. I need to store an email from Outlook in the field. Everything works fine if I drop the email on my desktop and then pick
by: Alan | last post by:
Hello, I trying to export my email to an access database. Outlook already this function, but not all the fields are available once the export is complet. The time & date stamps are not available. Also, the attachment file names field is not present. Are there other means of obtaining these information? Regards,
by: gj | last post by:
If anyone has worked with this I would be interested to find out. I have successfully put send/receive emails into an application using SMTP/POP server but would like to do something more professional with IMAP. I basically want a full email client in Access that can connect to an IMAP server. I have played with a few ActiveX controls but would like others experiences. TIA
by: Daven Thrice | last post by:
I know how to send email out of Access, and that's no problem. What I need to figure out is how to receive email into access. Say that I give access an email address, such as access@daven.com. I want all email that comes to that address to be received directly by the database so that I can parse out the files. I'm thinking that, worst case, I can write my own email client using the winsock control. But is that my only alternative?
by: tymperance | last post by:
I have a report that I currently email directly from Access as an attachment using a macro. I need to make it be the body of the email instead. Can that be accomplished without extensive VBA programming? Thanks!
by: diwadube2003 | last post by:
I get a Warning message while automatically sending email through MS Access, using Outlook. Can anybody help me out with this.
by: ttamilvanan81 | last post by:
Hai. I needto Receive Email using Ms-Access and Outlook. On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called “Save to Access”. When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE Here contact name and job name are in the access table fields. We go to select any one contact...
by: PPPPPPPPP | last post by:
I Am Not Able To Link Access Database In Visual Basic .please Help Me To Do So . Thanking You In Anticipation.
by: wassimdaccache | last post by:
Hello Experts; I have a wireless router TP-link I made security phrase for it. What i am trying to do is to configure a d-link access point as a repeater for the TP-link and always not working :(!!! while i am scanning in my access point (d-link) I see the tp-link and I am able to connect but when I scan using my wifi on my laptop I'm not seeing the D-link . Why ?
by: davekearley | last post by:
Hi all, first post, looks like a great site. I have a small problem with Access. I need to link to an ODBC table (SQL7) but when i go to the link dialogue, the ODBC entry is missing. I have other linked tables in this DB and they all re-link ok so the system DSN is working fine. Any ideas? I have not linked a table for some time and cant remember how to get the ODBC option back.
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,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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...
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,...
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...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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.