Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Update button is greyed out

Update button is greyed out

Scheduled Pinned Locked Moved Visual Basic
helpannouncement
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Buggedforever
    wrote on last edited by
    #1

    the code below is for an application through whose front end i update relevant info like agreement etc...The problem is when I am trying to enter an agreement the 'UPDATE' button is greyed out(Inactive). The issue seems to be in Private Sub cmdUpdate0_Click() The code below is for the whole form. CODE STARTS ( Option Explicit Private m_objAgreement As CAgreement Private m_objAgreeDetail As CAgreeDetail Private m_objCode As CCode Private m_objCompGroup As CCompGroup Private m_objDivision As CDivision Private m_objEmployee As CEmployee Private m_objNegotiation As CNegotiation Private m_objPart As CPart Private m_objSupplier As CSupplier Private m_frmSupSearch As frmSupSearch Private m_rsNegCode As Recordset Private m_rsAgreeNo As Recordset Private m_frmAddCompGroup As frmAddCompGroup Private m_blnInitialCall As Boolean Private m_blnBeenOnTab0 As Boolean Private m_blnBeenOnTab1 As Boolean Private m_blnBeenOnTab2 As Boolean Private m_blnBeenOnTab3 As Boolean Private m_intInValidCnt As Integer ' Required fields only Private m_frmParent As Form 'Ref to FMenuHost Parent form Private m_blnCallFromMenu As Boolean Private m_strAgree0 As String Private m_strAgree1 As String Private m_strAgree2 As String Private m_strAgree3 As String Private m_strCommitmentType As String Private m_strPrevNegCode As String Private Enum idxMaint idxMaintCommitmentType = 0 idxMaintAgreementType = 1 idxMaintNegotiatedCurrency = 2 idxMaintAgreeStatus = 3 idxMaintStartDate = 4 idxMaintEndDate = 5 idxMaintFinalShipDate = 6 idxMaintPercentShare = 7 idxMaintScope = 8 idxMaintPreferredUOM = 9 idxMaintDiscountPercent = 10 idxMaintDiscountDays = 11 idxMaintNetDays = 12 idxMaintReturnAuthorization = 13 idxMaintAgreeComments = 14 End Enum Private Enum tabIndex tabMaint = 0 tabAddPart = 1 tabPrice = 2 tabCopy = 3 End Enum Private Enum lvlLevel lvlAgreement = 1 lvlCompGroup = 2 lvlPart = 3 lvlDivision = 4 End Enum Private Const NegCodeMaxLength = 4 Private Const AgreeNoMaxLength = 8 Private Const CopyAgreeJobId = "m4110" Private Sub Form_Load() On Error GoTo ERR_ROUTINE Set m_objAgreement = New CAgreement Set m_objAgreeDetail = New CAgreeDetail Call PopulateNeg m_blnCallFromMenu = True

    D J D 3 Replies Last reply
    0
    • B Buggedforever

      the code below is for an application through whose front end i update relevant info like agreement etc...The problem is when I am trying to enter an agreement the 'UPDATE' button is greyed out(Inactive). The issue seems to be in Private Sub cmdUpdate0_Click() The code below is for the whole form. CODE STARTS ( Option Explicit Private m_objAgreement As CAgreement Private m_objAgreeDetail As CAgreeDetail Private m_objCode As CCode Private m_objCompGroup As CCompGroup Private m_objDivision As CDivision Private m_objEmployee As CEmployee Private m_objNegotiation As CNegotiation Private m_objPart As CPart Private m_objSupplier As CSupplier Private m_frmSupSearch As frmSupSearch Private m_rsNegCode As Recordset Private m_rsAgreeNo As Recordset Private m_frmAddCompGroup As frmAddCompGroup Private m_blnInitialCall As Boolean Private m_blnBeenOnTab0 As Boolean Private m_blnBeenOnTab1 As Boolean Private m_blnBeenOnTab2 As Boolean Private m_blnBeenOnTab3 As Boolean Private m_intInValidCnt As Integer ' Required fields only Private m_frmParent As Form 'Ref to FMenuHost Parent form Private m_blnCallFromMenu As Boolean Private m_strAgree0 As String Private m_strAgree1 As String Private m_strAgree2 As String Private m_strAgree3 As String Private m_strCommitmentType As String Private m_strPrevNegCode As String Private Enum idxMaint idxMaintCommitmentType = 0 idxMaintAgreementType = 1 idxMaintNegotiatedCurrency = 2 idxMaintAgreeStatus = 3 idxMaintStartDate = 4 idxMaintEndDate = 5 idxMaintFinalShipDate = 6 idxMaintPercentShare = 7 idxMaintScope = 8 idxMaintPreferredUOM = 9 idxMaintDiscountPercent = 10 idxMaintDiscountDays = 11 idxMaintNetDays = 12 idxMaintReturnAuthorization = 13 idxMaintAgreeComments = 14 End Enum Private Enum tabIndex tabMaint = 0 tabAddPart = 1 tabPrice = 2 tabCopy = 3 End Enum Private Enum lvlLevel lvlAgreement = 1 lvlCompGroup = 2 lvlPart = 3 lvlDivision = 4 End Enum Private Const NegCodeMaxLength = 4 Private Const AgreeNoMaxLength = 8 Private Const CopyAgreeJobId = "m4110" Private Sub Form_Load() On Error GoTo ERR_ROUTINE Set m_objAgreement = New CAgreement Set m_objAgreeDetail = New CAgreeDetail Call PopulateNeg m_blnCallFromMenu = True

      D Offline
      D Offline
      DoctorMick
      wrote on last edited by
      #2

      Do you really expect someone to read all that code and try and help you? Try posting only the relevant code.

      1 Reply Last reply
      0
      • B Buggedforever

        the code below is for an application through whose front end i update relevant info like agreement etc...The problem is when I am trying to enter an agreement the 'UPDATE' button is greyed out(Inactive). The issue seems to be in Private Sub cmdUpdate0_Click() The code below is for the whole form. CODE STARTS ( Option Explicit Private m_objAgreement As CAgreement Private m_objAgreeDetail As CAgreeDetail Private m_objCode As CCode Private m_objCompGroup As CCompGroup Private m_objDivision As CDivision Private m_objEmployee As CEmployee Private m_objNegotiation As CNegotiation Private m_objPart As CPart Private m_objSupplier As CSupplier Private m_frmSupSearch As frmSupSearch Private m_rsNegCode As Recordset Private m_rsAgreeNo As Recordset Private m_frmAddCompGroup As frmAddCompGroup Private m_blnInitialCall As Boolean Private m_blnBeenOnTab0 As Boolean Private m_blnBeenOnTab1 As Boolean Private m_blnBeenOnTab2 As Boolean Private m_blnBeenOnTab3 As Boolean Private m_intInValidCnt As Integer ' Required fields only Private m_frmParent As Form 'Ref to FMenuHost Parent form Private m_blnCallFromMenu As Boolean Private m_strAgree0 As String Private m_strAgree1 As String Private m_strAgree2 As String Private m_strAgree3 As String Private m_strCommitmentType As String Private m_strPrevNegCode As String Private Enum idxMaint idxMaintCommitmentType = 0 idxMaintAgreementType = 1 idxMaintNegotiatedCurrency = 2 idxMaintAgreeStatus = 3 idxMaintStartDate = 4 idxMaintEndDate = 5 idxMaintFinalShipDate = 6 idxMaintPercentShare = 7 idxMaintScope = 8 idxMaintPreferredUOM = 9 idxMaintDiscountPercent = 10 idxMaintDiscountDays = 11 idxMaintNetDays = 12 idxMaintReturnAuthorization = 13 idxMaintAgreeComments = 14 End Enum Private Enum tabIndex tabMaint = 0 tabAddPart = 1 tabPrice = 2 tabCopy = 3 End Enum Private Enum lvlLevel lvlAgreement = 1 lvlCompGroup = 2 lvlPart = 3 lvlDivision = 4 End Enum Private Const NegCodeMaxLength = 4 Private Const AgreeNoMaxLength = 8 Private Const CopyAgreeJobId = "m4110" Private Sub Form_Load() On Error GoTo ERR_ROUTINE Set m_objAgreement = New CAgreement Set m_objAgreeDetail = New CAgreeDetail Call PopulateNeg m_blnCallFromMenu = True

        J Offline
        J Offline
        Jay Royall
        wrote on last edited by
        #3

        Hi, I can see that this is your first post here so before posting again I would read the message at the top of this board on how to ask a question. You have supplied way too much code here and because it isn't formatted, some people won't even read it. With regards to your problem, what I suggest you do is place a break point in your code and step through it, checking the conditions that will result in cmdUpdate0.Enabled equalling false.

        1 Reply Last reply
        0
        • B Buggedforever

          the code below is for an application through whose front end i update relevant info like agreement etc...The problem is when I am trying to enter an agreement the 'UPDATE' button is greyed out(Inactive). The issue seems to be in Private Sub cmdUpdate0_Click() The code below is for the whole form. CODE STARTS ( Option Explicit Private m_objAgreement As CAgreement Private m_objAgreeDetail As CAgreeDetail Private m_objCode As CCode Private m_objCompGroup As CCompGroup Private m_objDivision As CDivision Private m_objEmployee As CEmployee Private m_objNegotiation As CNegotiation Private m_objPart As CPart Private m_objSupplier As CSupplier Private m_frmSupSearch As frmSupSearch Private m_rsNegCode As Recordset Private m_rsAgreeNo As Recordset Private m_frmAddCompGroup As frmAddCompGroup Private m_blnInitialCall As Boolean Private m_blnBeenOnTab0 As Boolean Private m_blnBeenOnTab1 As Boolean Private m_blnBeenOnTab2 As Boolean Private m_blnBeenOnTab3 As Boolean Private m_intInValidCnt As Integer ' Required fields only Private m_frmParent As Form 'Ref to FMenuHost Parent form Private m_blnCallFromMenu As Boolean Private m_strAgree0 As String Private m_strAgree1 As String Private m_strAgree2 As String Private m_strAgree3 As String Private m_strCommitmentType As String Private m_strPrevNegCode As String Private Enum idxMaint idxMaintCommitmentType = 0 idxMaintAgreementType = 1 idxMaintNegotiatedCurrency = 2 idxMaintAgreeStatus = 3 idxMaintStartDate = 4 idxMaintEndDate = 5 idxMaintFinalShipDate = 6 idxMaintPercentShare = 7 idxMaintScope = 8 idxMaintPreferredUOM = 9 idxMaintDiscountPercent = 10 idxMaintDiscountDays = 11 idxMaintNetDays = 12 idxMaintReturnAuthorization = 13 idxMaintAgreeComments = 14 End Enum Private Enum tabIndex tabMaint = 0 tabAddPart = 1 tabPrice = 2 tabCopy = 3 End Enum Private Enum lvlLevel lvlAgreement = 1 lvlCompGroup = 2 lvlPart = 3 lvlDivision = 4 End Enum Private Const NegCodeMaxLength = 4 Private Const AgreeNoMaxLength = 8 Private Const CopyAgreeJobId = "m4110" Private Sub Form_Load() On Error GoTo ERR_ROUTINE Set m_objAgreement = New CAgreement Set m_objAgreeDetail = New CAgreeDetail Call PopulateNeg m_blnCallFromMenu = True

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Absolutely noone is going to look through all that code to try and find out what your problem is. You should only post the RELEVANT portions of code, not the entire fricken' project.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          S 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Absolutely noone is going to look through all that code to try and find out what your problem is. You should only post the RELEVANT portions of code, not the entire fricken' project.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            S Offline
            S Offline
            Steven J Jowett
            wrote on last edited by
            #5

            Dave Kreskowiak wrote:

            Absolutely noone is going to look through all that code

            Is that a challenge? ;)

            Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.

            D 1 Reply Last reply
            0
            • S Steven J Jowett

              Dave Kreskowiak wrote:

              Absolutely noone is going to look through all that code

              Is that a challenge? ;)

              Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Not really, but if you felt so inclined, please...far be it from me to hold you back. ;)

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008
              But no longer in 2009...

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups