| View previous topic :: View next topic |
| Author |
Message |
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Jan 26th, 2004 09:30 AM Post subject: TextBox Bug |
|
|
When I read or write property SomeTextBox.text I get message "Compile error: Method or data member not found" on selection ".text".
Why I write here? Because I copied calling this property from MSDN example and got such messages.
Please, tell where I misstake. |
|
| Back to top |
|
Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
|
| Back to top |
|
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Jan 26th, 2004 10:10 AM Post subject: |
|
|
I wrote "SomeTextBox" for example.
Realy I wrote
DSNname = DSNBox.Text
and got this message
I am not beginer programmer, I am beginer in Visual Basic.
PS: Sorry for my english _________________ In IT we trust |
|
| Back to top |
|
Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
|
| Back to top |
|
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Jan 26th, 2004 10:19 AM Post subject: |
|
|
It is DSNBox _________________ In IT we trust |
|
| Back to top |
|
Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Jan 26th, 2004 03:23 PM Post subject: |
|
|
The name is right because if it was wrong the error would be object not found... Maybe it is a different control? Are you using the standard control that comes with VB or maybe a custom made one that may have different property names? _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Jan 27th, 2004 01:25 AM Post subject: |
|
|
I'm going to have to agree with you both on this...It could be the simple switch of the variables as far as what side of the = sign it goes on, but it could be that the DSNBox control doesn't have a .text property. If it's not a textbox or dropdown, it's probably .value or .caption instead of .text.
DSNBox isn't a shape is it? _________________ If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too. |
|
| Back to top |
|
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Jan 27th, 2004 03:34 AM Post subject: |
|
|
Thanks everybody!
It was wery stupid my bug.
I inserted one TextBox control and copied it 5 ones (I often do that in Delphi). After that it made array of TextBoxes.
Excuse me for your time _________________ In IT we trust |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Jan 27th, 2004 04:25 AM Post subject: |
|
|
Oh, so it was a control array! I never thought of that... _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
|
| Back to top |
|
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Jan 27th, 2004 05:13 AM Post subject: |
|
|
I didn't wrote rigth, it was not array, it is called Collection in VB _________________ In IT we trust |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Jan 27th, 2004 05:17 AM Post subject: |
|
|
I don't think you can have a collection of controls :confused: As far as I know it's called a control array  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Jan 27th, 2004 09:05 AM Post subject: |
|
|
theoretically, collections are arrays of controls  _________________ If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too. |
|
| Back to top |
|
|