Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is my Outlook form haunted? (Outlook 98, access 97)

    My form is called PC Conversoin and is part of a group of forms called CIGARS (Client Information Gathering And Reporting System). One of my users had called up my form and forwarded via a button to our group (Distribution list called CIGARS) for processing. Just back ground information.

    Three hours later this user called and said one of his outlook messages that he had gotten from a client been resent to the client and had in the FROM section CIGARS (our distribution list). Now we are also getting (intercepting? ) message from our users to clients. But, the client name is moved to the CC and our distribution list is in the TO section.

    From this limited information can any take a guess on what is happening?

  2. #2
    5 Star Lounger
    Join Date
    May 2001
    Location
    Washington, USA
    Posts
    750
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    Have you run a virus scan? I haven't seen this specific behavior described, but some of them do this sort of thing in general. They'll scan your contacts or pab and send out their own mail, randomly re-send mail, or send documents.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    I have found a bug in my forms that will in the right circumstance, send out an email message instead of the Form being worked on. These are the steps that will produce the problem.

    1. Open a New message or Reply to a message
    2. Start a CIGARS form
    3. Switch back to your email message and enter more information.
    4. Switch back to the CIGARS and press the "Submit Request to CIGARS"

    The "Submit Request to CIGARS" cmd button is used to forward the request via code to a distribution list.
    This will send your email message and not the CIGARS form. In order for this not happen until we fix this problem, we ask that the users make sure that you are not in Outlook either creating a new message or replying to a message.

    This is the code I use to forward this form:

    Sub Forward1
    SetObjForward = Application.ActivInspector.Currentitem
    ObjForward.To="CIGARS"
    ObjForward.SendOnBehalfOfName=strCAD
    ObjForward.Send
    End Sub

    Can anyone recommend what I can change? By clicking on the new message and then back to my forms it id's my message as the CurrentItem.

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    How can I program it in VB so that I can make the "CurrentItem" the form? Will a double click bring the focus to the button/form (between step 3 and step4). If I leave it as is... a single click will activate the button on the form. Will a double click 1.set the focus on the form and 2. act on the button. Can someone show me how to do it?

    1. Open a New message or Reply to a message
    2. Start a CIGARS form
    3. Switch back to your email message and enter more information.
    4. Switch back to the CIGARS and press the "Submit Request to CIGARS"

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Washington, USA
    Posts
    750
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    I'm guessing the line "setObjForward = ..." is a typo on your message and the real code reads "Set ObjForward..." (with a space after Set). Otherwise, you're names are mixed up. It's hard to say what that would do. If the code is "Set ObjForward..." then .CurrentItem should return the form with Focus. If it's not, try using "Item.xxx because "Item" always refers to the form running the code.

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    Not sure what u mean my item.xxx - this is beyond my pre-beginners level. How can I get the focus back to my form and the cmdbutton? THis is what I"m trying to do. Any ideas?

    '-=-=-=-=-=-=-=-=-
    'Send Form to CIGARS
    '-=-=-=-=-=-=-=-=-
    Sub CB1_Click()
    blankit
    End Sub
    '-=-=-=-=-=-=-=-=-

    '-=-=-=-=-=-=-=-=-
    Sub Blankit()
    Stophere=0
    If UserProperties.Find("wfn2").Value = "" then
    Msgbox"Client field cannot be blank. Try again.",vbCritical
    Stophere = 1
    Elseif UserProperties.Find("pro1").Value = "" then
    Msgbox"Promail field cannot be blank. Try again.",vbCritical
    Stophere = 1

    Elseif UserProperties.Find("PCconlist").Value = "" then
    Msgbox"PC Conversion field cannot be blank. Try again.",vbCritical
    Stophere = 1

    Else

    If UserProperties.Find("erc").Value = "" then
    Msgbox"Expected Record Count field cannot be blank. Try again.",vbCritical
    Stophere = 1
    End if
    End if

    If Stophere = 0 then
    Call update2
    Call Forward1
    end If
    End Sub
    '-=-=-=-=-=-=-=-=-

    '-=-=-=-=-=-=-=-
    Sub Update2()
    Dim Obe
    Dim MyDB
    Dim Rst
    Dim Rsm

    'On error resume next
    Set Dbe = Application.CreateObject("DAO.DBEngine.35")
    If Err.Number <> 0 Then
    MsgBox Err.Description & "--- Some functions may not work correctly" _
    & Chr(13) & "Please make sure that DAO 3.5 is installed on this machine"
    Exit sub
    End If

    Set MyDB = Dbe.Workspaces(0).OpenDatabase("tabsproddatabaseed garcigarstest1.mdb")
    RequestNum = UserProperties.Find("jobnum").Value
    Set Rst = MyDB.OpenRecordset("select * from dbPCon where tasknum = " & RequestNum)

    If Rst.EOF = True And Rst.BOF = True Then '
    Set Rst = MyDB.OpenRecordset("dbPCon")
    rst.addnew
    Else
    rst.edit
    End if

    ' Access side Outlook side
    Rst.fields("Tasknum") = UserProperties.Find("Jobnum").Value
    Rst.fields("pcconlist") = UserProperties.Find("pcconlist").Value
    Rst.fields("label") = UserProperties.Find("label").Value
    Rst.fields("memo3") = UserProperties.Find("memo3").Value

    Rst.update
    Rst.close

    'Update DBTask
    RequestNum = UserProperties.Find("jobnum").Value
    Set Rst = MyDB.OpenRecordset("select * from dbtask where tasknum = " & RequestNum)

    If Rst.EOF = True And Rst.BOF = True Then
    MsgBox "Empty record or not found" 'error hand
    Else

    Rst.Edit
    If UserProperties.Find("cdatestart").Value <> "1/1/4501" Then
    Rst.Fields(1).Value = UserProperties.Find("cdatestart").Value
    End If

    If UserProperties.Find("ctimestart").Value <> "1/1/4501" Then
    Rst.Fields(2).Value = UserProperties.Find("ctimestart").Value
    End If

    If UserProperties.Find("ctimeended").Value <> "1/1/4501" Then
    Rst.Fields(3).Value = UserProperties.Find("ctimeended").Value
    End If

    Rst.Fields(5).Value=UserProperties.Find("coper1"). Value
    Rst.Fields(8).Value=UserProperties.Find("txtstatus ").Value
    Rst.Fields(17).Value = UserProperties.Find("pro1").Value
    Rst.Fields(16).Value = UserProperties.Find("wfn2").Value
    Rst.Fields(11).Value = Time
    Rst.Update
    End If
    Rst.Close
    MyDB.Close
    End Sub
    '-=-=-=-=-=-=-=-=

    '-=-=-=-=-=-=-=-=
    Sub Forward1
    Set ObjForward = Application.ActiveInspector.CurrentItem
    ObjForward.To="Daniel Reyes"
    ObjForward.SentOnBehalfOfName=strCAD
    ObjForward.Send
    End Sub
    '-=-=-=-=-=-=-=-=

  7. #7
    5 Star Lounger
    Join Date
    May 2001
    Location
    Washington, USA
    Posts
    750
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    Try making the following changes (the stuff in brackets <xxx> is just instructions, not code) :
    -=-=-=-=-=-=-=-=
    Sub Forward1
    Set ObjForward = Application.ActiveInspector.CurrentItem <Delete this line>
    ObjForward.To="Daniel Reyes" <Replace with-> item.to = "Daniel Reyes"
    ObjForward.SentOnBehalfOfName=strCAD <Replace with -> item.sentOnBehalfOfName = strCAD
    ObjForward.Send <Replace with-> item.send
    End Sub
    '-=-=-=-=-=-=-=-=

    Hope this helps

  8. #8
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is my Outlook form haunted? (Outlook 98, access 97)

    Under a controlled test it seems to work. I will try it on a few people tomorrow in an online mode then.

    Thank you for your help and patience

Posting Permissions

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