Results 1 to 10 of 10
  1. #1
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2k, Terminal services and Outlook (Access 2000)

    Edited by HansV to break very long line that caused horizontal scrolling.

    We are running Access 2K under Terminal Services on 3 wireless networked laptops. Works fine (mostly). Part of the database produces reports, some of which I wish to send as snapshot attachments to various bods in the office. Pre-Office 2K service pack 2 I use the SendObject command. The laptops are configured to load the database under TS. The TS users have Outlook in their startup group. Sometimes email is sent as expected, sometimes not. The messages are held in the outbox, sent at some later time when outlook deems to load. How can I ensure that outlook sends email everytime?

    ATM the laptops are running the same Access frontend DB under TS but I will be giving each laptop its own frontend soon.
    Laptops are running Office SP1, installing SP2 or greater causes other problems regarding MS security. PC's are post SP2 and I have to use Redemption extended MAPI calls. That works fine on PCs but not ont he lappies under TS.

    Code snippet for SendObject<pre>DoCmd.SendObject acSendReport, "rptManifest", "Snapshot Format", _
    strEmailTo, , , "Missing Items" & strSubject, "For information only", False</pre>

    Code snippet for Redemption<pre>Call sendEmail(strEmailTo, "Missing Items" & strSubject, "rptmanifest")</pre>

    <pre>Public Function sendEmail(strTo As String, strSubject As String, strRep As String)
    Dim msg As Object
    Dim gappOutlook As Object
    Dim strToEmail As String
    Dim strMessagesubject As String
    Dim strBody As String
    Dim strSnapshotFile As String
    Dim strFilePath As String
    Dim strReport As String
    Dim omsg As Object

    If golApp Is Nothing Then
    If InitialiseOutlook = False Then
    MsgBox "outlook not loaded"
    Exit Function
    Else
    'MsgBox "Outlook loaded"
    End If
    End If


    Set golApp = CreateObject("Outlook.Application")
    Set omsg = golApp.CreateItem(olMailItem)
    Set msg = New Redemption.SafeMailItem

    msg.Item = omsg

    strToEmail = strTo
    strMessagesubject = strSubject
    strBody = "For information only - redemption" & vbCrLf & "Closed"
    strReport = strRep
    strFilePath = Application.CurrentProject.Path & ""
    strSnapshotFile = strFilePath & "Missing.snp"

    DoCmd.OutputTo objecttype:=acOutputReport, _
    objectname:=strReport, _
    outputformat:=acFormatSNP, _
    outputfile:=strSnapshotFile


    With msg
    .To = strToEmail
    .Subject = strMessagesubject
    .Body = strBody
    .Attachments.Add strSnapshotFile
    .Send
    End With

    End Function</pre>

    I don't mind which method I use so long as the email is sent immediately.
    Can anyone help?

    Mark

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    I believe your problem is with Terminal Services. If Outlook is running on the laptop, and Access is running on the Terminal Services server, it's pretty hard for it to get to the Outlook session running on the laptop. As you probably know, Terminal Services basically accepts keystrokes from the laptop, and sends screen paints to the laptop, but the application actually runs on the server. That would also put a crimp in trying to run the front-end on the laptop and the back-end in a Terminal Server session. I would suggest either running all applications under Terminal Services (as we do with some of our clients), or putting them all on the laptops, and running Access and Outlook locally with linked tables in a back-end database on the server.
    Wendell

  3. #3
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    Thanks Wendell

    The users login to TS with credentials different to the laptop login (for group policy reasons). The TS user login has Outlook in its startup group. Outlook is not running on the laptops. Is there a better way to run the 2 programs ie both Access and Outlook in one TS session?

    Running the frontend locally is too slow over a wireless connection (only got 11Mbps ATM)

    Mark

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    You definitely want to run Access and Outlook in the same TS session if you want them to talk to each other reliably via Automation, and even if you are using SendMail I would recommend it. Putting them in separate sessions just adds overhead on the Terminal Server as well.

    I'm surprised at your comment about performance on an 11Mbps wireless LAN being too slow however. I run a laptop on a 11MB wireless LAN, and while it isn't as fast as my alternate 100Mbps LAN using a PCMCIA Card, it certainly is workable. In addition, when you put the forms on the workstation, they load at Hard Drive speed, not LAN speed, so the only delays deal with getting data. If you are pulling huge amounts of data out of a Jet back-end that could be problematic, but otherwise I suspect you have issues either with Latency (which should also impact TS sessions), or you may have a problem with adequate RAM on your laptops. If you are running OUtlook and Access at the same time, you probably should have more than 64MB of RAM with Win98, or if you are running WinXP you should probably have 256MB of RAM.
    Wendell

  5. #5
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    Wendell

    It is certainly my intention to run Access and Outlook in the same TS session. The TS client fires up the database as its command line. How do I make sure Outlook is running too? I've tried putting Outlook in the the TSUser profile but the results are inconsistent. Could I perhaps run a batch file or cmd from the TS client to run boths progs?

    The problem with the wireless setup is the amount of data that's moved around. Whilst I would agree forms would load quicker locally its the recordsource behind the form that's slowing things down. Also the database chrns out some reportts that require a fair bit of number crunching, again, a bit too slow over wireless. could you explain what you mean by latency?

    The laptops have 64Mb RAM and are running win2k. Not ideal I admit but I am looking to upgrade them as a matter of course.

    Mark

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    Hi Mark,

    Do I understand correctly that the Access application starts automatically when you sign in with the Terminal Services client? If that's the case, you should also be able to start Outlook in the same manner, and you should then be able switch back and forth between the two in the same TS client window. Other questions however - are you running Exchange Server for email purposes, or is it a simple POP3/SMTP connection to an ISP?

    The performance issues can get to be pretty nasty if you are running a complex query or generating a report and lots of data is involved, but for most applications a 10MBit LAN is acceptable (if not as zippy as 100MBit). The latency issue is more to do with delays in putting packets together to send across the wireless LAN, or with data errors that occur with wireless connections that require retransmission, thus slowing down the actual speed. Finally, with 64MB systems running only Win2000 and the TS client, you should be OK. But running any local apps would promptly kill performance with disk swapping.
    Wendell

  7. #7
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    Wendell

    I'll put up some screenshots tomorrow when I'm at work. It should help explain what I mean a it better.

    Your points about performance make a lot of sense. It's for those reasons I decided to run the database under TS, I figured the less data I was sending via wireless the better. The laptops don't run anything else but the TS session BTW.

    Thanks
    Mark

  8. #8
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    Wendell

    Here's a screen shot of TS client setup
    <IMG SRC=http://www.sparky99.demon.co.uk/images/ts.jpg>

    The whole of the command line....
    "j:dataappsmicrosoft officeofficemsaccess.exe" "J:dataaccess databasesmanifesttsusersgobook1stores-fe.mdb" /wrkgrp "j:dataaccess databasesmanifestmanifest.mdw"

    As you can see the session just loads the database. How do I run Outlook as well? I suppose I could have both Outlook and the database in the TS login's startup group but I don't really want the users to actively interact with Outlook so alt-tabbing between them is unnecessary. Loading the database as shown above only lets the user use that program - if they quit the database the TS session ends. That's the way I want it. I just want Outlook to sit in the background and deal with sending these emails. Or is there another way??

    Thanks
    Mark

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    As you suggest, you could start Outlook in the same fashion as you do the database, but if you don't want them getting into it to do other things such as reading email, or managing contacts, etc. that isn't desirable. Another approach would be to start an Automation session with Outlook when you open the database. As I recall you were using SendMail which works with whatever email program, but can be a bit flakey. We have a brief Automation tutorial on our website, but you might want to look at <!mskb=209948>Microsoft Knowledge Base Article 209948<!/mskb> specifically. If you start an Outlook session when the Access database is opened, it remains in the background and does it's thing and as I recall, doesn't normally show on the taskbar. Let us know how you get on if you try it.
    Wendell

  10. #10
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2k, Terminal services and Outlook (Access 2000)

    Wendell

    Thanks again. I'll check out your tutorial and the KB and report back.

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •