Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Interface and Graphics

Post new topic   Reply to topic
TextBox Bug
View previous topic :: View next topic  
Author Message
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Jan 26th, 2004 09:30 AM    Post subject: TextBox Bug Reply with quote

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
View user's profile Send private message Send e-mail ICQ Number
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Jan 26th, 2004 09:33 AM    Post subject: Reply with quote

Hi!

You're getting this error becuase your textbox name is not SomeTextBox..just replace the name with your text box's name.

Then it should work!

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Jan 26th, 2004 10:10 AM    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail ICQ Number
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Jan 26th, 2004 10:18 AM    Post subject: Reply with quote

Hi!

Hmm..what's your textbox name is ?

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Jan 26th, 2004 10:19 AM    Post subject: Reply with quote

It is DSNBox
_________________
In IT we trust
Back to top
View user's profile Send private message Send e-mail ICQ Number
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Jan 26th, 2004 10:23 AM    Post subject: Reply with quote

Okay!

To add text to DSNBox you'll use the following code:

Code:
DSNBox.Text = "hello world!"


Hope this helps!

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Jan 26th, 2004 03:23 PM    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Jan 27th, 2004 01:25 AM    Post subject: Reply with quote

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
View user's profile Send private message
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Jan 27th, 2004 03:34 AM    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail ICQ Number
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Jan 27th, 2004 04:25 AM    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Jan 27th, 2004 04:44 AM    Post subject: Reply with quote

Ya me also...!!! Smile But oh well..!! No problem! ;-)
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Jan 27th, 2004 05:13 AM    Post subject: Reply with quote

I didn't wrote rigth, it was not array, it is called Collection in VB
_________________
In IT we trust
Back to top
View user's profile Send private message Send e-mail ICQ Number
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Jan 27th, 2004 05:17 AM    Post subject: Reply with quote

I don't think you can have a collection of controls :confused: As far as I know it's called a control array Wink
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Jan 27th, 2004 09:05 AM    Post subject: Reply with quote

theoretically, collections are arrays of controls Smile
_________________
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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Interface and Graphics All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic