Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Oct 2002
    Location
    Houston, Texas, USA
    Posts
    303
    Thanks
    0
    Thanked 0 Times in 0 Posts

    buttons not working (MS Outlook 2003)

    I have just finished with a new form in the Edit Compose page. This section works fine. I then switch over to the Edit Read page and add a few more things. Some of the items are command button that I use to take the information from the form and write it to a database.

    My problem? I fill out the first section and mail the form. When it's opened at the other end, they fill all the fields. Now they try to press the command buttoms but nothing happens.


    '-=-=-=-=-=-=-=-
    'Job Started button
    Sub cmdjobstart_click()
    cmdjobstart1_click
    update1
    msgbox "Access file has been updated"
    End Sub
    '-=-=-=-=-=-=-=-

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

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

    set nms= application.getnamespace("mapi")
    vrUser= nms.currentuser

    UserProperties.Find("Sjob").Value = Date
    UserProperties.Find("txtstatus").Value = "Work in Progress"
    End Sub
    '-=-=-=-=-=-=-=

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

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

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

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

    ' Access side Outlook side
    Rst.Fields("tapelog") = UserProperties.Find("tapelog").Value
    Rst.fields("jobnum") = UserProperties.Find("Jobnum").Value
    Rst.fields("dreturn") = UserProperties.Find("dreturn").Value
    Rst.fields("pro1") = UserProperties.Find("pro1").Value
    Rst.fields("rto") = UserProperties.Find("rto").Value
    Rst.fields("approvedby") = UserProperties.Find("approvedby").Value
    Rst.fields("Reqby") = UserProperties.Find("Reqby").Value
    Rst.fields("Client") = UserProperties.Find("client").Value
    ' Rst.fields("memo3") = UserProperties.Find("memo3").Value
    Rst.update

    ' 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("Sjob").Value <> "." Then
    Rst.Fields(20).Value = UserProperties.Find("SJob").Value
    End If

    If UserProperties.Find("Ejob").Value <> "." Then
    Rst.Fields(21).Value = UserProperties.Find("EJob").Value
    End If

    Rst.Fields(3).Value = UserProperties.Find("Operator1").Value
    Rst.Fields(10).Value = UserProperties.Find("Operator2").Value
    Rst.Fields(4).Value = UserProperties.Find("txtstatus").Value
    'Rst.Fields(11).Value = UserProperties.Find("client").Value
    Rst.Fields(22).Value = UserProperties.Find("History").Value
    Rst.Fields(23).Value = UserProperties.Find("pro1").Value
    Rst.Update
    End if
    Rst.close
    MyDB.Close
    End Sub
    '-=-=-=-=-=-=-=-=-=-

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: buttons not working (MS Outlook 2003)

    > they try to press the command buttoms but nothing happens

    Does it work on your machine?

    Does any VBScript run on their machine? Even MsgBox "Yes, VBScript is running!" ?

Posting Permissions

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