473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Name '_txtCompany' is not declared

As I run the program , there is always error 'Name '_txtCompany' is not
declared
I didn't modify found, i can't find any named "_txtCompany" in my program
I check "txtCompany" , this textbox seems quit ok , nothing special.
What is "_txtCompany" ??
please help
Nov 20 '05 #1
4 2681
Hi Agnes,

Sometimes when you use the designer and delete things there stay some parts,
do not ask me when, mostly is it because you have added something what you
would not do twice or something.

Can you open the designer part (the +) and than check again on that.

You can also do a check on your complete project if it is maybe on an orphan
dataset.vb in your project.

Cor
As I run the program , there is always error 'Name '_txtCompany' is not
declared
I didn't modify found, i can't find any named "_txtCompany" in my program
I check "txtCompany" , this textbox seems quit ok , nothing special.
What is "_txtCompany" ??
please help

Nov 20 '05 #2
* "Agnes" <ag***@dynamictech.com.hk> scripsit:
As I run the program , there is always error 'Name '_txtCompany' is not
declared
I didn't modify found, i can't find any named "_txtCompany" in my program
I check "txtCompany" , this textbox seems quit ok , nothing special.
What is "_txtCompany" ??


Does doubleclicking the error bring you to the line where the error
occured? I assume that it's a compile-time error.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #3
As i double click, it didn't point out anything...

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> ???
news:%2***************@TK2MSFTNGP12.phx.gbl ???...
* "Agnes" <ag***@dynamictech.com.hk> scripsit:
As I run the program , there is always error 'Name '_txtCompany' is not
declared
I didn't modify found, i can't find any named "_txtCompany" in my program I check "txtCompany" , this textbox seems quit ok , nothing special.
What is "_txtCompany" ??


Does doubleclicking the error bring you to the line where the error
occured? I assume that it's a compile-time error.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 20 '05 #4
Agnes wrote:
As I run the program , there is always error 'Name '_txtCompany' is not
declared
I didn't modify found, i can't find any named "_txtCompany" in my program
I check "txtCompany" , this textbox seems quit ok , nothing special.
What is "_txtCompany" ??
please help


I too get this same error. To fix it I go into the " Windows Form
Designer generated code " Region of the code behind the form, and change
the line

Friend WithEvents txtCompany As System.Windows.Forms.TextBox

to

Friend WithEvents txtCompany2 As System.Windows.Forms.TextBox

move off the line (just up/down arrow), then go back (down/up) and
change it back to

Friend WithEvents txtCompany As System.Windows.Forms.TextBox

and it compiles.
This is surely a bug in VS.NET (or the compiler), and I hope it's fixed
in 2005. If not before, as I get it in about 3 or 4 files, which are
read-only (under source control - VSS 6.0d), so can't possibly have
changed since the last successful compile (about 1 minute previous). It
occurs about 1 in every 3 compiles.
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Pete Mahoney | last post by:
I am currently working on an ASP page where I create a lot of different check boxes. I have some checkboxes that are Windows platforms and some that are solaris platforms. I want a control...
4
by: Dan Jacobson | last post by:
Using <A name="x_y-z"></A>, I even get nervous about the _ and -. w3-recs/RECS/html4/struct/links.html seems to say all of ascii is cool and beyond. Anyway, just what is the safe range for...
8
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
20
by: Jim Ford | last post by:
I understand that some compilers define a symbol that can be used anywhere in the code in order to find out, at run time, the name of the file where the code corresponding to the current execution...
3
by: Mark Oliver | last post by:
Hi, Is there any way to get the declaration name of a parameter either through reflection, StackFrame, or something else? Thanks, Mark
0
by: Guoqi Zheng | last post by:
Dear sir, I am very new to asp.net. I often meet a problem of name 'xxx' is not declared. can some one tell me what is the problem? For example, my following code gives me an error of "Name...
13
by: Don | last post by:
How do I get an Enum's type using only the Enum name? e.g. Dim enumType as System.Type Dim enumName as String = "MyEnum" enumType = ???(enumName)
4
by: andrew | last post by:
Hi, I have routinely added anchors to pages using both name and id: <a name="example" id="example"></a> under the possibly mistaken assumption that at some stage "name" might be deprecated...
0
by: padmagvs | last post by:
I have a wsdl something like this <?xml version="1.0" ?> <definitions targetNamespace="http://abc.com/namespace/wsif/samples/abc" xmlns:tns="http://abc.com/namespace/wsif/samples/abc"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.