Home inventory database - categorizing

D

Dave

I've created a home inventory database. I would like to categorize my
records (items) into three categories: Computer hardware, Computer software,
and Miscellaneous.

My questions are:

1) What's the best control to put in my record form to select the category
the item belongs in? Drop box? Radio button? How do I do this?

2) Can I create a "conditional" field (i.e. Product ID) that will only
appear on the record form when Software is selected, and/or disappear when I
select another category?

Any information is MUCH appreciated! :)

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

Steve Schapel

Dave,

Opinions would vary for question 1. I would nearly always use an Option
Group for this type of thing, with 3 option buttons, one for each
category. A Combobox would also be a good choice.

As regards the Product ID, the answer depends whether your form is
Single view or Continuous view. If it's Single view, you can put a VBA
procedure on both the Current event of the form, and also the After
Update event of Category, like this...
Me.Product_ID.Visible = Me.Category = 2
(assumes you used an Option Group for Category, and the option value of
Software is 2)
However, this won't work on a Continuous form. You can use Conditional
Formatting of the Product ID control to enable/disable, but cannot be
done with visible. However, you can get sneaky and also use Conditional
Formatting to set the BackColor and the ForeColor of the Product ID
control to the same colour as the BackColor of the form itself, so it
appears like it's hidden.
 
Top