Properties problem: .Text and .Value do not capitalize

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • L Mehl

    Properties problem: .Text and .Value do not capitalize

    Using VBA, when assigning values to variables from textboxes or comboboxes.
    the property "Text" or "Value" does not capitalize, yet the assignment
    works.

    In addition, appending "Text" or "Value" to the control name is not even
    necessary to make the assignment work.

    Examples:
    strStringValue1 = Me.cmbCombo1.va lue

    strStringValue2 = me.txtTextBox2. text

    Does this indicate a problem with other pieces of code, or settings for the
    database in general?

    Thanks for any help.

    Larry Mehl




    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.555 / Virus Database: 347 - Release Date: 12/23/2003


  • MGFoster

    #2
    Re: Properties problem: .Text and .Value do not capitalize

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    No. Don't worry about it.

    It is easier to just deal with .Value rather than .Text. In reality
    you do not need to explicitly indicate the .Value since the default
    property of the control is the .Value.

    strStringValue1 = Me.cmbCombo1

    gets the same results as

    strStringValue1 = Me.cmbCombo1.va lue


    HTH,

    MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
    Oakland, CA (USA)

    -----BEGIN PGP SIGNATURE-----
    Version: PGP for Personal Privacy 5.0
    Charset: noconv

    iQA/AwUBP+zhsYechKq OuFEgEQKpeQCcCO lur20ZOouetCL95 gc3k2fnhs4AoMwa
    I5EqKTTOpHP5LCj wba3WHNYU
    =oal0
    -----END PGP SIGNATURE-----


    L Mehl wrote:
    [color=blue]
    > Using VBA, when assigning values to variables from textboxes or comboboxes.
    > the property "Text" or "Value" does not capitalize, yet the assignment
    > works.
    >
    > In addition, appending "Text" or "Value" to the control name is not even
    > necessary to make the assignment work.
    >
    > Examples:
    > strStringValue1 = Me.cmbCombo1.va lue
    >
    > strStringValue2 = me.txtTextBox2. text
    >
    > Does this indicate a problem with other pieces of code, or settings for the
    > database in general?
    >
    > Thanks for any help.
    >
    > Larry Mehl[/color]

    Comment

    • L Mehl

      #3
      Re: Properties problem: .Text and .Value do not capitalize

      Thank you.

      Larry Mehl

      "MGFoster" <me@privacy.com > wrote in message
      news:0l5Hb.2062 4$Pg1.771@newsr ead1.news.pas.e arthlink.net...[color=blue]
      > -----BEGIN PGP SIGNED MESSAGE-----
      > Hash: SHA1
      >
      > No. Don't worry about it.
      >
      > It is easier to just deal with .Value rather than .Text. In reality
      > you do not need to explicitly indicate the .Value since the default
      > property of the control is the .Value.
      >
      > strStringValue1 = Me.cmbCombo1
      >
      > gets the same results as
      >
      > strStringValue1 = Me.cmbCombo1.va lue
      >
      >
      > HTH,
      >
      > MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
      > Oakland, CA (USA)
      >
      > -----BEGIN PGP SIGNATURE-----
      > Version: PGP for Personal Privacy 5.0
      > Charset: noconv
      >
      > iQA/AwUBP+zhsYechKq OuFEgEQKpeQCcCO lur20ZOouetCL95 gc3k2fnhs4AoMwa
      > I5EqKTTOpHP5LCj wba3WHNYU
      > =oal0
      > -----END PGP SIGNATURE-----
      >
      >
      > L Mehl wrote:
      >[color=green]
      > > Using VBA, when assigning values to variables from textboxes or[/color][/color]
      comboboxes.[color=blue][color=green]
      > > the property "Text" or "Value" does not capitalize, yet the assignment
      > > works.
      > >
      > > In addition, appending "Text" or "Value" to the control name is not even
      > > necessary to make the assignment work.
      > >
      > > Examples:
      > > strStringValue1 = Me.cmbCombo1.va lue
      > >
      > > strStringValue2 = me.txtTextBox2. text
      > >
      > > Does this indicate a problem with other pieces of code, or settings for[/color][/color]
      the[color=blue][color=green]
      > > database in general?
      > >
      > > Thanks for any help.
      > >
      > > Larry Mehl[/color]
      >[/color]


      ---
      Outgoing mail is certified Virus Free.
      Checked by AVG anti-virus system (http://www.grisoft.com).
      Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003


      Comment

      • James Neumann

        #4
        Re: Properties problem: .Text and .Value do not capitalize

        Larry,

        I wouldn't freak about this - this happens on a number of boxes I work
        on with the ".Name" property of controls. I've never been able to
        figure out why, but it doesn't affect the code as it runs.

        MG is right, but IMO I like to declare the actual property, rather
        than rely on default settings. Too easy to get burned, and it can be
        very difficult to debug when something does go wrong.

        JCN


        "L Mehl" <mehl_nospam@cy vest.com> wrote in message news:<2nLHb.973 5$lo3.822@newsr ead2.news.pas.e arthlink.net>.. .[color=blue]
        > Thank you.
        >
        > Larry Mehl
        >
        > "MGFoster" <me@privacy.com > wrote in message
        > news:0l5Hb.2062 4$Pg1.771@newsr ead1.news.pas.e arthlink.net...[color=green]
        > > -----BEGIN PGP SIGNED MESSAGE-----
        > > Hash: SHA1
        > >
        > > No. Don't worry about it.
        > >
        > > It is easier to just deal with .Value rather than .Text. In reality
        > > you do not need to explicitly indicate the .Value since the default
        > > property of the control is the .Value.
        > >
        > > strStringValue1 = Me.cmbCombo1
        > >
        > > gets the same results as
        > >
        > > strStringValue1 = Me.cmbCombo1.va lue
        > >
        > >
        > > HTH,
        > >
        > > MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
        > > Oakland, CA (USA)
        > >
        > > -----BEGIN PGP SIGNATURE-----
        > > Version: PGP for Personal Privacy 5.0
        > > Charset: noconv
        > >
        > > iQA/AwUBP+zhsYechKq OuFEgEQKpeQCcCO lur20ZOouetCL95 gc3k2fnhs4AoMwa
        > > I5EqKTTOpHP5LCj wba3WHNYU
        > > =oal0
        > > -----END PGP SIGNATURE-----
        > >
        > >
        > > L Mehl wrote:
        > >[color=darkred]
        > > > Using VBA, when assigning values to variables from textboxes or[/color][/color]
        > comboboxes.[color=green][color=darkred]
        > > > the property "Text" or "Value" does not capitalize, yet the assignment
        > > > works.
        > > >
        > > > In addition, appending "Text" or "Value" to the control name is not even
        > > > necessary to make the assignment work.
        > > >
        > > > Examples:
        > > > strStringValue1 = Me.cmbCombo1.va lue
        > > >
        > > > strStringValue2 = me.txtTextBox2. text
        > > >
        > > > Does this indicate a problem with other pieces of code, or settings for[/color][/color]
        > the[color=green][color=darkred]
        > > > database in general?
        > > >
        > > > Thanks for any help.
        > > >
        > > > Larry Mehl[/color]
        > >[/color]
        >
        >
        > ---
        > Outgoing mail is certified Virus Free.
        > Checked by AVG anti-virus system (http://www.grisoft.com).
        > Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003[/color]

        Comment

        • L Mehl

          #5
          Re: Properties problem: .Text and .Value do not capitalize

          James --

          Thanks.

          Larry

          "James Neumann" <boston_77_4@ho tmail.com> wrote in message
          news:77809f1e.0 312291307.54540 f39@posting.goo gle.com...[color=blue]
          > Larry,
          >
          > I wouldn't freak about this - this happens on a number of boxes I work
          > on with the ".Name" property of controls. I've never been able to
          > figure out why, but it doesn't affect the code as it runs.
          >
          > MG is right, but IMO I like to declare the actual property, rather
          > than rely on default settings. Too easy to get burned, and it can be
          > very difficult to debug when something does go wrong.
          >
          > JCN
          >
          >
          > "L Mehl" <mehl_nospam@cy vest.com> wrote in message[/color]
          news:<2nLHb.973 5$lo3.822@newsr ead2.news.pas.e arthlink.net>.. .[color=blue][color=green]
          > > Thank you.
          > >
          > > Larry Mehl
          > >
          > > "MGFoster" <me@privacy.com > wrote in message
          > > news:0l5Hb.2062 4$Pg1.771@newsr ead1.news.pas.e arthlink.net...[color=darkred]
          > > > -----BEGIN PGP SIGNED MESSAGE-----
          > > > Hash: SHA1
          > > >
          > > > No. Don't worry about it.
          > > >
          > > > It is easier to just deal with .Value rather than .Text. In reality
          > > > you do not need to explicitly indicate the .Value since the default
          > > > property of the control is the .Value.
          > > >
          > > > strStringValue1 = Me.cmbCombo1
          > > >
          > > > gets the same results as
          > > >
          > > > strStringValue1 = Me.cmbCombo1.va lue
          > > >
          > > >
          > > > HTH,
          > > >
          > > > MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
          > > > Oakland, CA (USA)
          > > >
          > > > -----BEGIN PGP SIGNATURE-----
          > > > Version: PGP for Personal Privacy 5.0
          > > > Charset: noconv
          > > >
          > > > iQA/AwUBP+zhsYechKq OuFEgEQKpeQCcCO lur20ZOouetCL95 gc3k2fnhs4AoMwa
          > > > I5EqKTTOpHP5LCj wba3WHNYU
          > > > =oal0
          > > > -----END PGP SIGNATURE-----
          > > >
          > > >
          > > > L Mehl wrote:
          > > >
          > > > > Using VBA, when assigning values to variables from textboxes or[/color]
          > > comboboxes.[color=darkred]
          > > > > the property "Text" or "Value" does not capitalize, yet the[/color][/color][/color]
          assignment[color=blue][color=green][color=darkred]
          > > > > works.
          > > > >
          > > > > In addition, appending "Text" or "Value" to the control name is not[/color][/color][/color]
          even[color=blue][color=green][color=darkred]
          > > > > necessary to make the assignment work.
          > > > >
          > > > > Examples:
          > > > > strStringValue1 = Me.cmbCombo1.va lue
          > > > >
          > > > > strStringValue2 = me.txtTextBox2. text
          > > > >
          > > > > Does this indicate a problem with other pieces of code, or settings[/color][/color][/color]
          for[color=blue][color=green]
          > > the[color=darkred]
          > > > > database in general?
          > > > >
          > > > > Thanks for any help.
          > > > >
          > > > > Larry Mehl
          > > >[/color]
          > >
          > >
          > > ---
          > > Outgoing mail is certified Virus Free.
          > > Checked by AVG anti-virus system (http://www.grisoft.com).
          > > Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003[/color][/color]


          ---
          Outgoing mail is certified Virus Free.
          Checked by AVG anti-virus system (http://www.grisoft.com).
          Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003


          Comment

          Working...