Home inventory: categorizing via drop box

D

Dave

Hello, all! A while ago, I posted a message about a home inventory database
I'm creating. I would like to have the records sorted into three categories:
Computer hardware, Computer software, and Miscellaneous.

I would like to create a drop box for each record to denote what type of
item it is. The form is one screen long, and the database will be sorted by
the category, then by the record, alphabetically.

However, the last time I tried the drop box for the three categories, every
record was forced to the same category. How do I get this going?

Any information MUCH appreciated! Thanks... :)

(OFF TOPIC: As I type this message, Outlook Express changes focus away from
my E-mail window when it refreshes the newsgroup. This is annoying! How do I
fix this??? LOL)

============================
- Dave
http://members.cox.net/grundage/
 
D

Dirk Goldgar

Dave said:
Hello, all! A while ago, I posted a message about a home inventory
database I'm creating. I would like to have the records sorted into
three categories: Computer hardware, Computer software, and
Miscellaneous.

I would like to create a drop box for each record to denote what type
of item it is. The form is one screen long, and the database will be
sorted by the category, then by the record, alphabetically.

However, the last time I tried the drop box for the three categories,
every record was forced to the same category. How do I get this going?

Any information MUCH appreciated! Thanks... :)

Is this a continuous form, or is it in single-form view? Is the combo
box bound to a field in the table; that is, is its ControlSource
property the name of a field in the table? If the ControlSource is
blank, then the combo box is completely unrelated to the table, and will
always show what you last selected in it, for all records.
(OFF TOPIC: As I type this message, Outlook Express changes focus
away from my E-mail window when it refreshes the newsgroup. This is
annoying! How do I fix this??? LOL)

I'm not sure what you're talking about, so I can't answer this one.
 
D

Dave

Okay, I got to the part where you can put the selected category in a
predetermined field. But I don't want the category to appear twice in the
record. Is there any way you can select the category and make *it* "the
field"?

After all, the database will soon be sorted via category...

============================
- Dave
http://members.cox.net/grundage/
 
D

Dirk Goldgar

Dave said:
Okay, I got to the part where you can put the selected category in a
predetermined field. But I don't want the category to appear twice in
the record. Is there any way you can select the category and make
*it* "the field"?

After all, the database will soon be sorted via category...

It sounds to me like you are unfamiliar with the way Access works. What
you describe, "select[ing] the category and make *it* 'the field'", is
the normal way for Access to do it. Normally you would have a combo box
on your form, bound to the table field in which you want to store the
value that is selected in the combo box. (By "bound", I mean that the
combo box control has that field as its ControlSource.) You wouldn't
need another field to also hold that value, and you wouldn't need any
other control on the form bound to that field. The combo box will
automatically display, for each record, the item from its list that
corresponds to the value that is currently stored in the bound field.
Change the combo box, and you change the field.

<lecture mode on>
You should understand the distinction between "controls" and "fields".
We use the terms a little loosely -- even Microsoft does, in their help
files -- but a *control* is a user-interface object on a form or report,
while a *field* is a data storage object in a table or query. Many
types of Access controls can be "bound" to fields by setting their
ControlSource properties to the name of one of the fields in the form's
RecordSource -- the table or query to which the form itself is bound.
When a control is bound to a field, changes to the value of the control
are passed through to that field, so changing the control changes the
field automatically, and changes made to the field by any other means
are reflected in the value shown for the control.

One trick that is available for a combo box control is that the list can
have multiple columns. Only one column, the one identified by the Bound
Column property, can be actually stored in the field to which the combo
box is bound, but you can set up the combo box so that some other column
is actually displayed in the control. This is often used to *store* a
numeric index value while *displaying* descriptive text. It's
controlled by the column order and the ColumnWidths property -- the
combo box will always display the first column that has a non-zero
width.
<lecture mode off>

I hope that helps.
 
Top