Connecting Tech Pros Worldwide Help | Site Map

Properties problem: .Text and .Value do not capitalize

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 05:17 PM
L Mehl
Guest
 
Posts: n/a
Default 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.value

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



  #2  
Old November 12th, 2005, 05:17 PM
MGFoster
Guest
 
Posts: n/a
Default 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.value


HTH,

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

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

iQA/AwUBP+zhsYechKqOuFEgEQKpeQCcCOlur20ZOouetCL95gc3k2 fnhs4AoMwa
I5EqKTTOpHP5LCjwba3WHNYU
=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.value
>
> 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]

  #3  
Old November 12th, 2005, 05:19 PM
L Mehl
Guest
 
Posts: n/a
Default Re: Properties problem: .Text and .Value do not capitalize

Thank you.

Larry Mehl

"MGFoster" <me@privacy.com> wrote in message
news:0l5Hb.20624$Pg1.771@newsread1.news.pas.earthl ink.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.value
>
>
> HTH,
>
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP for Personal Privacy 5.0
> Charset: noconv
>
> iQA/AwUBP+zhsYechKqOuFEgEQKpeQCcCOlur20ZOouetCL95gc3k2 fnhs4AoMwa
> I5EqKTTOpHP5LCjwba3WHNYU
> =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.value
> >
> > 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


  #4  
Old November 12th, 2005, 05:20 PM
James Neumann
Guest
 
Posts: n/a
Default 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@cyvest.com> wrote in message news:<2nLHb.9735$lo3.822@newsread2.news.pas.earthl ink.net>...[color=blue]
> Thank you.
>
> Larry Mehl
>
> "MGFoster" <me@privacy.com> wrote in message
> news:0l5Hb.20624$Pg1.771@newsread1.news.pas.earthl ink.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.value
> >
> >
> > HTH,
> >
> > MGFoster:::mgf00 <at> earthlink <decimal-point> net
> > Oakland, CA (USA)
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGP for Personal Privacy 5.0
> > Charset: noconv
> >
> > iQA/AwUBP+zhsYechKqOuFEgEQKpeQCcCOlur20ZOouetCL95gc3k2 fnhs4AoMwa
> > I5EqKTTOpHP5LCjwba3WHNYU
> > =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.value
> > >
> > > 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]
  #5  
Old November 12th, 2005, 05:20 PM
L Mehl
Guest
 
Posts: n/a
Default Re: Properties problem: .Text and .Value do not capitalize

James --

Thanks.

Larry

"James Neumann" <boston_77_4@hotmail.com> wrote in message
news:77809f1e.0312291307.54540f39@posting.google.c om...[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@cyvest.com> wrote in message[/color]
news:<2nLHb.9735$lo3.822@newsread2.news.pas.earthl ink.net>...[color=blue][color=green]
> > Thank you.
> >
> > Larry Mehl
> >
> > "MGFoster" <me@privacy.com> wrote in message
> > news:0l5Hb.20624$Pg1.771@newsread1.news.pas.earthl ink.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.value
> > >
> > >
> > > HTH,
> > >
> > > MGFoster:::mgf00 <at> earthlink <decimal-point> net
> > > Oakland, CA (USA)
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: PGP for Personal Privacy 5.0
> > > Charset: noconv
> > >
> > > iQA/AwUBP+zhsYechKqOuFEgEQKpeQCcCOlur20ZOouetCL95gc3k2 fnhs4AoMwa
> > > I5EqKTTOpHP5LCjwba3WHNYU
> > > =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.value
> > > >
> > > > 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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.