I'll jump in here and see if I can help out by attempting to clarify
some terms:
bws93222 said:
Thanks everyone, I think I'm getting it now. Leaving aside for now
the best
practice idea of using only forms to change data, here is what y'all
are
saying (correct me if I'm wrong)
It's going to be difficult to "lay this aside", as you'll see as I
answer various points below.
-- Lookups should not be used and there is no need to have customer
names
displayed in the orders table--only the customer ID (key) needs to be
there.
You use the word displayed here which to my way of thinking muddies the
waters, so to speak. The customer ID (foreign key, or FK) is *stored* in
the orders table; assuming that this key is a meaningless number useful
only to the JET database engine you will *always* display the related
customer name when exposing the order information through the user
interface.
Also, *lookups* (at least, the function of lookup) is far too useful to
say "Lookups should not be used." Again, this may be a matter of
semantics, but it is *Lookup Fields* that should not be used.
Unless I want to create some totally unnecessary (non-lookup) customer
query
WITHIN the orders table, the recommended standard way to see both
order and
customer info is via a separate standalone query.
Whoa --- I'm not at all certain that I even follow what you just said
there.
Your Customers table and Orders tables are linked in the relationships
window in a one to many relationship on customer ID, correct? This join
'automagically' connects the customer name with the order ... all you
need to do when building the Query that will become the recordsource for
your form or report is to include the customer name field as one of the
columns in your query. The JET engine uses the defined relationship join
to know which customer name to retrieve.
There is no "separate standalone query" involved --- merely the query
that defines the fields that make up the order information.
--2 Remaining questions: 1) Assuming I follow the steps above so that
customers' IDs and NOT the customer names are displayed in the orders
table,
is it okay to use the lookup wizard to implement this?--Or does the
mere use
of the lookup wizard even in its most limited aspect, cause other
unmentioned
problems that make it still an undesirable tool?
I have never used the lookup wizard ... but see above for my answer to
this question.
2) Larry, in using the
2-column approach you mentioned above, this still causes only the
customer ID
(key) to be stored in the orders table--the only advantage here would
be that
should I decide to use the dropdowm list in the orders combobox, it
would
also show me the customer names associated with the customer IDs,
correct?
The *bound* column is the column stored in the table. By setting a
column width in the control properties for your combo box you can make
that column invisible.
Thx again everyone for all your help!
You're welcome!
HTH