By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,779 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,779 IT Pros & Developers. It's quick & easy.

Properties problem: .Text and .Value do not capitalize

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
-----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 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


Nov 12 '05 #2

P: n/a
Thank you.

Larry Mehl

"MGFoster" <me@privacy.com> wrote in message
news:0l*****************@newsread1.news.pas.earthl ink.net...
-----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 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.556 / Virus Database: 348 - Release Date: 12/26/2003
Nov 12 '05 #3

P: n/a
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" <me*********@cyvest.com> wrote in message news:<2n****************@newsread2.news.pas.earthl ink.net>...
Thank you.

Larry Mehl

"MGFoster" <me@privacy.com> wrote in message
news:0l*****************@newsread1.news.pas.earthl ink.net...
-----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 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.556 / Virus Database: 348 - Release Date: 12/26/2003

Nov 12 '05 #4

P: n/a
James --

Thanks.

Larry

"James Neumann" <bo*********@hotmail.com> wrote in message
news:77**************************@posting.google.c om...
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" <me*********@cyvest.com> wrote in message

news:<2n****************@newsread2.news.pas.earthl ink.net>...
Thank you.

Larry Mehl

"MGFoster" <me@privacy.com> wrote in message
news:0l*****************@newsread1.news.pas.earthl ink.net...
-----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

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.556 / Virus Database: 348 - Release Date: 12/26/2003

---
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
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.