Bound and Unbound

  • Thread starter Thread starter trabie
  • Start date Start date
T

trabie

Dear All,
Can any one help me in describing the difference between bound and unbound
text boxes. with examples if you please.

thanx
 
trabie said:
Dear All,
Can any one help me in describing the difference between bound and unbound
text boxes. with examples if you please.

There are three states really.

Controls that have field names (nothing else) in their ControlSource property.

Controls that have expressions in their ControlSource property (something that
begins with "=").

Controls that have a blank Control Source property.

The first would fit anyone's definition of "bound". The last would fit anyone's
definition of "unbound". The middle one is subject to interpretation.
 
Rick Brandt said:
Controls that have expressions in their ControlSource property (something that
begins with "=").

An example of this might be a continuous form where you choose to
display both the first name and last name in the same text field.
=[FirstName] & " " & [LastName]
or maybe
=[LastName] & ", " & [FirstName]

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Rick Brandt said:
Controls that have expressions in their ControlSource property (something that
begins with "=").

An example of this might be a continuous form where you choose to
display both the first name and last name in the same text field.
=[FirstName] & " " & [LastName]
or maybe
=[LastName] & ", " & [FirstName]

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

The bound field defined above says that if you change the value in the
txtbox you will automatically change the value in the underlying field
in the underlying Table. When you go to another record or close the
form the change is saved.

Neither of the other two definitions is actually associated with a
field in the same manner. If it says "Unbound" then if you change the
value and there is no associated code to do something with that value
nothing will happen when you close the form besides the fact that it
will be empty again when you open the form again.

If the txtbox has a "=" type of defintion, 1) you cannot change the
value of the field by typing over it. 2) the display value can be
changed however by changing the value in the field(s) that the "="
points to.

Ron
 
Back
Top