Avatar billede lisette Praktikant
29. december 2003 - 16:09 Der er 13 kommentarer og
1 løsning

Mail fra Access med link retur til bestemt post

Hej Eksperter !

Jeg har lavet en database til opgaveindlevering.

Personer kan udfylde en formular med en opgave, som ønskes udført. Når de klikker på gem, sendes en mail til opgaveløseren. Det kan jeg få til at virke fint, men...

..nu vil jeg gerne have et link med i mailen, således at opgaveløser, i den modtagne mail, kan klikke på linket og derved komme direkte ind i databasen på den konkrete opgave, hvor han kan acceptere eller afvise den.

Hvordan pokker gør man det ?? Glæder mig til at høre fra jer.

Mvh Lisette
Avatar billede terry Ekspert
29. december 2003 - 17:02 #1
The ONLY way I see this being done is using Access's startup command line options!

In the email you send to a person you will need to include a link to Access which includes a parameter to open the correct database and then I would think you can use the /cmd paramter to send a value which you can make use if in the program to go to the correct "opgave".

NOTE: This is only an idea, I am very sure it can be done but you will need to try it yourself as it will take some playing around to get it to work with your specific problem.

I would first suggest you make some VBA code (module/function) which you call with one or more paramaters. This code finds the correct opgave. Once that is working then you can try starting access with command line options. These command line options need to call the code you have mad which finds your opgave.


This is taken from Access Help.
>

Startup command-line options
The following table lists the Microsoft Access command-line options.

Option Effect
database  Opens the specified Microsoft Access database or Microsoft Access project. Include a path if necessary. If you are running Microsoft Windows 95, the default path is your My Documents folder.
/excl Opens the specified Access database for exclusive access. To open the database for shared access in a multiuser environment, omit this option. Applies to Access databases only.
/ro Opens the specified Access database or Access project for read-only access.
/user user name Starts Access by using the specified user name. Applies to Access databases only.
/pwd password Starts Access by using the specified password. Applies to Access databases only.
/profile user profile Starts Access by using the options in the specified user profile instead of the standard Windows Registry settings created when you installed Microsoft Access. This replaces the /ini option used in versions of Microsoft Access prior to Access 97 to specify an initialization file. 
/compact target database or target Access project Compacts and repairs the Access database, or compacts the Access project that was specified before the /compact option, and then closes Access. If you omit a target file name following the /compact option, the file is compacted to the original name and folder. To compact to a different name, specify a target file. If you don't include a path in target database or target Access project, the target file is created in your My Documents folder by default.
In an Access project, this option compacts the Access project (.adp) file but not the Microsoft SQL Server database.

/repair Repairs the Access database that was specified before the /repair option, and then closes Microsoft Access. In Microsoft Access 2000 or later, compact and repair functionality is combined under /compact. The /repair option is supported for backward compatibility. 
/convert target database Converts a previous-version Access database or Access project to the default file format, renames the new file, and then closes Access. You must specify the source database before you use the /convert option. To view the default file format, click Options on the Tools menu, and then click the Advanced tab.
/x macro Starts Access and runs the specified macro. Another way to run a macro when you open a database is to use an AutoExec macro.
/cmd Specifies that what follows on the command line is the value that will be returned by the Command function. This option must be the last option on the command line. You can use a semicolon (;) as an alternative to /cmd.
Use this option to specify a command-line argument that can be used in Visual Basic code.

/nostartup Starts Access without displaying the task pane (the second dialog box that you see when you start Access).
/wrkgrp workgroup
information file Starts Access by using the specified workgroup information file. Applies to Access databases only.

Notes
To run a Visual Basic for Applications procedure when you open a database, use the RunCode action in the AutoExec macro or in the macro that you run by using the command-line option /x. You can also run a Visual Basic procedure when you open a database by creating a form with a Visual Basic procedure defined for its OnOpen event. Designate this form as the startup form by right-clicking the Database window, clicking Startup, and then entering that form in the Display Form/Page box.
To specify a forward slash (/) or semicolon (;) on the command line, type the character twice. For example, to specify the password ;mjs/md on the command line, type ;;mjs//md following the /pwd command-line option.
Avatar billede terry Ekspert
29. december 2003 - 17:04 #2
The information taken from Access helps isnt formatted very well so I suggest you look under Command line options yourself.
Avatar billede lisette Praktikant
30. december 2003 - 14:12 #3
Hej Terry

Jeg kan få Access til at åbne korrekt vha. /cmd "ID3" men desværre kun på en shortcut. Jeg kan ikke få det til at virke i Outlook - den vil ikke acceptere at "C:\Databaser\Opgave-portal.mdb" efterfølges af /cmd.

Jeg tror, at jeg venter lidt og ser om ikke der er andre, som har en ide til at hjælpe mig - jeg tror at jeg prøver at fremføre problemet under Outlook.
Jeg vender tilbage !
Avatar billede terry Ekspert
30. december 2003 - 14:23 #4
not quite sure how you get /cmd to work if your shortcut is "C:\Databaser\Opgave-portal.mdb"

The shortcut must start Access, something like this

"C:\Program Files\Microsoft Office\Office\Msaccess.exe"  "C:\Test.MDB" /CMD "ID3"
Avatar billede lisette Praktikant
30. december 2003 - 15:24 #5
Jeg har prøvet begge muligheder. Og du har ret i, at min shortcut kun virker ved det du har nævnt, men det vil Outlook ikke acceptere.

Jeg har nu stillet spørgsmålet under Outlook - og venter på svar !
Avatar billede terry Ekspert
02. januar 2004 - 12:25 #6
og?
Avatar billede terry Ekspert
05. januar 2004 - 15:50 #7
Whats the status on this question now?
Avatar billede terry Ekspert
07. januar 2004 - 16:45 #8
!!!!!!
Avatar billede terry Ekspert
09. januar 2004 - 11:36 #9
Lisette>How about giving a status
Avatar billede terry Ekspert
12. januar 2004 - 20:00 #10
Lissete now I think its time we closed this question!
Avatar billede terry Ekspert
16. januar 2004 - 20:26 #11
Lissets>If you dont respond soon then admin will be on your tail!
Avatar billede lisette Praktikant
22. januar 2004 - 09:47 #12
Hej Terry

Jeg beklager, at jeg ikke har svaret dig - jeg har ikke været på i meget lang tid på grund af personlige problemer.

Du får naturligvis point

...og endnu engang undskyld !
Avatar billede lisette Praktikant
22. januar 2004 - 09:54 #13
Jeg skylder dig også lige en status på problemet....

jeg oprettede spørgsmålet under Outlook, men har aldrig fået en brugbart svar. I mellemtiden er der så sket en masse ting, som gør at jeg slet ikke får brug for svaret. Sååå det svæver stadig i det uvisse !
Avatar billede terry Ekspert
22. januar 2004 - 19:09 #14
thanks Lisette, hope things improve, they usually do :o)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester