Control Source vs. Row Source

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

What is the difference bewteen a Control Source and a Row
Source for a control on a Form?

Thanks,

Joe
 
The control source is the field that is bound to the control. The row source
applies to list boxes and combo boxes and determines the list items that are
displayed.
 
I've seen cases when both are used or one or the other is
used. What would be an example of using both? When would
I just set the row source or the control source?

Joe
 
The control source is what field, or value the combo RESULT will be saved.

So, if you combo box returns a list of Cities,then likely, the control
source, or the field that you want the RESULTS to be saved to is called the
control source.

The row source is simply where the combo will get these values from.

So, you can make a combo box without a control source, but it will not save
anything.

so, most controls you place on a screen can have a control source. That is
simply the forms underlying field that the control will save to. So, check
boxes, A persons name text box etc will usually have a control source of
where you want what you type into that control saved.

So, things like a normal text box don't have, nor need a row source. That
row source is just the place where the "possible" list of values comes from.

So, a combo box without a row source does no make much sense, since what
values will the combo display when you click on it. With no row source, the
combo box is not much use.

Now, having a combo box without a control source is actually fairly common
when you are asking, or prompting a user to do something. Remember, not all
forms in ms-access edit data, but often forms are for just general user
interface stuff. We call these forms un-bound, since the form is NOT
attached to a underlying table. We also call controls on a form that have no
control source un-bound.

So, take a look at the following screens. The forms at NOT attached to any
table, but good many of the combo boxes, and list boxes as you can see are
filled with data. In the following examples, the controls allow the user to
select things, but no data is ever saved. Since none of the combo box, or
listbox values are saved, then no contorl souce was ever needed (but, we
certanly need a row souce to fill them up for the user).

Take a look at:

http://www.attcanada.net/~kallal.msn/ridesrpt/ridesrpt.html
 
Back
Top