What is the difference between bound and unbound controls in MS Access? How do they differ? And when on an MS Access Form in design view, how can we tell if a form is bound or not?
Bound control – associated with a field in an underlying table. Use bound controls to display, enter, and update values from fields in the database. Unbound control – does not have a data source. Use unbound controls to display pictures and static text.
So, a bound form has a RecordSource, a table or query to which the form is "tied" or "based". An unbound form does not have a RecordSource, that doesn't mean it can't contain data, but the programmer will have to bring that data in manually, where a bound form automatically is associated with some data.
Unbound forms are forms with no data source, whereas bound forms have one and it's the default way to bind your form to your tables or queries.
The most common type of control is the text box; these can display many different types of data, such as text, numbers, and dates.
A bound control is one that is bound to a field in a table or to a function. An unbound control has no Control Source property, similarly, a bound form has no Record Source. You can check the property sheet.
Bound elements are linked directly back to the relevant tables, and when you amend any data within form's, your changes are immediately written to the tables. This can often lead to people questioning why "when I close a form does it save the changes?" Well that's bound behaviour for you, and to prevent any updates you must use procedures such as BeforeUpdate to cancel if necessary. Bound controls are easy to identify as they will contain the field names from the table in design view.
Unbound forms are quite the opposite, they are not tied directly to database fields and involve more coding work in order to initially populate them in normal view. However these will not automatically make changes to your tables without a custom procedure you have written e.g. a Save button. This allows a little more control, but also involves more work and good understanding of VBA coding. Unbound controls are also easy to identify as they will contain the word unbound in design view.
Note: There is much more can be said but this is a basic outline.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With