Open record from email

F

Fluke

Hi.

I'm creating a database for recording modifications. There's a set workflow
of authorisation that has to be followed. I'm making it so a user can double
click on a Signed field and it inserts their login name, with the field being
locked otherwise to make sure it can only be that person whose name can be
recorded. no problems there.

Once they've signed, an email will be generated for the next person. No
probs there either. What I'm after is some way to attach something
automatically that will let that next user double click to open the relevant
record directly.

Our computer services department do something like this (is it vbs or
something?) but they keep their secrets guarded lol!

Any help would be appreciated :)
 
S

Stefan Hoffmann

hi Fluke,
Once they've signed, an email will be generated for the next person. No
probs there either. What I'm after is some way to attach something
automatically that will let that next user double click to open the relevant
record directly.
You can use

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
PathToMdb /cmd RecordID

You can read the string behind /cmd in Access with the Command() function.


mfG
--> stefan <--
 
F

Fluke

Hi Stefan.

Thanks for the superfast reply.

Sounds good, but I'm lost as to what to actually do with that! Not as
advanced as I might have sounded, lol.
 
S

Stefan Hoffmann

hi,
Sounds good, but I'm lost as to what to actually do with that! Not as
advanced as I might have sounded, lol.
Put that into batch file and send it to our users.

In Access use a start form or AutoExec macro to call a VBA methode,
which reads from Command() and opens the specified record.


mfG
--> stefan <--
 
F

Fluke

Hi Stefan

Thanks for your help. I see what you mean, even if I'm not sure how to
implement it.

Any chance of a bit of a walk through? What would I put in the code to
generate the email that would produce the link for the next user to open the
relevant record?
 
S

Stefan Hoffmann

hi Fluke,
Any chance of a bit of a walk through? What would I put in the code to
generate the email that would produce the link for the next user to open the
relevant record?
Generating the batch:

Const ACCESS As String = "PathToAccess.Exe"
Const BATCH As String = "PathTo.Bat"
Const DATABASE As String = "PathTo.Mdb"

Dim lngHandle As Long
Dim strBatch As String

lngHandle= FreeFile
strBatch = ACCESS & " " & DATABASE & " /cmd " & [yourRecordId]

If Len(Dir(BATCH)) > 0 Then
Kill BATCH
End If

Open BATCH For Output As #lngHandle
Print #lngHandle, strBatch
Close #lngHandle

Create a form, put in the Form load event a simple

MsgBox Command()

Assign this form as start form. Run the batch from above.

Generate an email:

http://www.jephens.com/howtoemail.asp


mfG
--> stefan <--
 
Top