473,566 Members | 3,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Renamaing Text Boxes or Controls

Should text boxes or combo boxes be renamed on bound forms?
In other word should the Department Name property be the same as
Control Source property?
I never rename them, but my IT manager seems to think they should be.
My IT manager is afraid he will be updating the Department column,
when he is trying only display a value in the text box without
changing the value in the table.

Jan 28 '07 #1
1 1515
to*******@msn.c om wrote:
>Should text boxes or combo boxes be renamed on bound forms?
In other word should the Department Name property be the same as
Control Source property?
I never rename them, but my IT manager seems to think they should be.
My IT manager is afraid he will be updating the Department column,
when he is trying only display a value in the text box without
changing the value in the table.

I think your IT manager has the right idea for the wrong
reason. If you assign a value to a bound control or its
field, regardless of their names, you will change both of
them.

IMO, you should rename a control whenever you reference it
in a control source expression or in an event procedure. A
common practice is to prefix the field name with three
characters that indicate the type of the control. E.g. a
text box bound to the field ABC would be named txtABC.

In general, if a name could be either a contol or a field, a
reference will be to the control, but, personally, I don't
want to rely on that.

Note that a control source expression can not refer itself
(circular reference). This means, for example, that text
box ABC can not use an expression that refers to field ABC.
To use that kind of expression, the text box must be
renamed.

--
Marsh
Jan 28 '07 #2

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

Similar topics

9
4745
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and DataSet; and all I'm doing is showing one record in text fields, allowing the user to modify the text fields, and then updating the database again...
2
1770
by: Julie | last post by:
I'm wondering what standard/best practices are for the following scenario: I have a page representing several fields for stored data. If the user has sufficient access privileges, the page is rendered w/ read/write text boxes and they can edit the various fields as needed. However, if the user doesn't have sufficient privileges (i.e. view...
9
6656
by: B-Dog | last post by:
I have a form that has about 10 text boxes on it, they all have to be filled out before submitting is there a quick way to make sure that none are null or do I have to call out each textbox? Say something like textbox1 through textbox10? Thanks
7
4203
by: Andrew McKendrick | last post by:
Hi, I've noticed a bug in VB.NET (latest .NET Framework)... - I have a TabControl on a form with several tabs. - Each tab contains text boxes that are bound to fields in a data source (DataBindings). - When I display a record and then try to access the .Text property of one of the text boxes on any tab except the current tab, the result...
11
16219
by: Edson Peacock | last post by:
I have a report with sub reports, one of the subreports have 12 text boxes that are 2" high and I want them all to grow if one goes to 3" high. If anyone has any suggestions they are very much appreciated. Thanks
9
2233
by: Bill (Unique as my name) | last post by:
Please suggest some links or sources which show how to set up form text boxes in VBA. Thank you so much.
4
1882
by: jmacduff | last post by:
I have a set of pages ( about 10 ) that all have the same controls at the top, however I am unable to put the controls the master page for the site since the other 50 pages dont have the controls. Is there a way that I can define a common template / etc where this code can live 1 place and then I can just use it / insert it onto these ten...
1
1119
by: JDeats | last post by:
So I have a new WebForm created in VS.NET 2005 that's in the default "flow layout". I have a dropdown list box followed by HTML break- return <brtags and two two text boxes, below the text boxes I have a command button. I have set the text boxes Visible property to False when the page loads there is empty space where this controls would be...
5
7762
by: ofilha | last post by:
I have created a report in design mode. However, some of the fields i need are dynamic. That is, i have a series of fields text boxes mostly that must show up only as needed. I also have some labels that also should dynamic depending on the text boxes. I first tried createReportcontrol during the OnOpen event for the report,and when i tried...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6263
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.