Results 1 to 6 of 6

Thread: Why it is "pbAdd" instead of "cmdAdd"

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2005
    Posts
    26

    Why it is "pbAdd" instead of "cmdAdd"

    Hi,

    Clarify the following plz. Why it is "pbAdd" for command buttons name property instead of "cmdAdd".

    Private Sub pbAddNew_Click()
    adoPublishers.Recordset.AddNew
    ChangeStatus NowAdd
    txtCompanyID.SetFocus

    End Sub

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Why it is "pbAdd" instead of "cmdAdd"

    typically cmd is used for command buttons, but it is NOT required.

    are you sure its a command button? could be a PictureBox (pb)
    there are click events for almost all controls
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Why it is "pbAdd" instead of "cmdAdd"

    Maybe named pbAdd for PushButtonAdd
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  4. #4
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Why it is "pbAdd" instead of "cmdAdd"

    well.. yep, its a Command button.

    Not sure. as I said.. the cmd is typacally the way to name a command button but it is not required, you can name it anything you want. Its just a good idea to stick to the standard naming convention so that others can understand what you are doing in your code
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5

  6. #6
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Why it is "pbAdd" instead of "cmdAdd"

    Quote Originally Posted by user3377
    Clarify the following plz. Why it is "pbAdd" for command buttons name property instead of "cmdAdd".
    Because someone named it that way.

Posting Permissions

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



Click Here to Expand Forum to Full Width