Good on your part...glad to see you jumped right into the pond!!
The above is because your form is bound. By "bound" it means that the form
is attached to a table. Further, it also means that your listbox is bound
to a field.
So, in access when you hear people say that my form is un-bound, they simply
mean that the form is not attached to (or based on) a table (or query).
We don't need a bound form to just select something from a table. this means
you can un-bind the form.
Bring up a form in design mode. Make sure you select the form
(to select the form in design mode go edit->select form)
Now bring up the properties sheet
(view->properties)
Now, click on the data tab.
The first entry is called Recordsouce, and this sets the table that the form
is BOUND to. It is very likely, and very common to build forms that just
prompt the user for things, but don't actually edit data (I don't know if
this is your case.). For example, all of the forms in the "report" screen
shots shown here are un-bound
http://www.members.shaw.ca/AlbertKallal/ridesrpt/ridesrpt.html
In addition to what we call a un-bound form, we also have what is called
un-bound controls. So, it is possible that your report prompt screen is
going to be attached to a table for editing of some data, but not likely.
However, you listbox control MOST CERTAINLY needs to be un-bound. Remember,
a lsitbox, or a combo box can be placed on a form that edits data, and the
value you select from the listbox (or combo box) can be "saved" into a field
of the forms bound data. We don't need to save this selection, so, remove
the field that the listbox is bound to.
Simply bring up the form in design mode, click on the listbox, and view the
properties sheet. On the data tab, simply remove the field name in the
"control source".
By the way, when you use the wizard to build a listbox, the last two options
are
- Remember that value for
later use (un-bound - don't save selection)
- Store that value in
this field (bound - save selection into a field in table)
So, when using the wizard, you can build a un-bound listbox (and, the form
may, or may not still be bound to a table). So, you have the concept of
un-bound that applies to a form, or a control. In your case, we are 100%
sure we want the list box to be un-bound. As for if the form needs to be
un-bound...I can't know, or read your mind (but, the form being bound, or
un-bound is up to your needs).
This reprot prompt screen could work with both the form being un-bound, and
the listbox being un-bound. note that a list box can receive the data from a
table, but as long as your don't set the "contorl source" of the listbox, it
is considerd un-bound
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
Got it!