Did you follow the track to
www.mvps.org/access ? If not, it's worth a peek
Having a lookup table with the state codes is a great idea but you get at it
with the query for your combobox on the form rather than having it percolate
up as an artifact of a table. You have exactly the same access to your data
and in exactly the same form.
Now consider the case where you are attempting to include the state
information in a query that you've designed based on a table with a lookup
field as you describe. The query you're designing won't return the value
for a state. Try it. The lucky people who asked about lookup fields and,
having been told to avoid them, plunged ahead anyway will discover the
problems early and take remedial action. Most novices don't discover their
problem until very late in the day. They put in the lookup fields because
they looked like a lot of free functionality and it's impressive as can be
to have something so cool to show off. As time goes on they spend more
effort making their applications more useful. Their early forms aren't too
sophisticated and they probably don't even bother to create reports. As
they start to create more sophisticated forms and queries and reports
they're going to discover that the queries that make everything else work
seem not to work too well. There are some fields that return garbage or
nothing at all. Guess which fields. Some hardworking and creative types
will come up with ingenious work-arounds but, in time, nothing can overcome
the flaw. The longer it takes to come to that realization the worse the
reckoning. The only way to correct the problem is to go back and correct
the tables. Now just about every form and query that used the affected
tables will have to be changed to get the required functionality. I could
go on.
If you haven't heard it before, may I be the first to tell you that the
cornerstone of a good application is good data design - identifying and
representing the entities that play in your application space - the tables!
Get them right and everything else is possible and surprisingly easy. How
do you get them right? Get to know what you're trying to represent and then
design your tables obeying the relational rules. So help me, Codd! [E.F.
Codd and C. J. Date; heavy hitting IBMers circa 1970 - think of DB2].
There are rules of Normalization where your tables are concerned. Third
Normal Form is pretty much the minimum standard for most applications. If
you don't know what that means then you'll probably go back to "touch up"
the Access work you've done before learning.
If you just googled the words "lookup field" in all of the Access newsgroups
then you probably saw a thread on microsoft.public.access in which I'm
involved. Did you see where the other person wrote
"AAAAAAAAAAHHHHHHHHHHHHHHHH!"? He'd been warned about lookup fields, used
them anyway, was having troubles with a query that just wouldn't work and I
said I wouldn't try to help him further until he got rid of the lookup
fields.
After more carefully re-reading your post, I have a feeling that you may
have confused Lookup Fields in tables with "lookup tables". Lookup tables
are a good thing. They are just normal tables with some meaningful list
that is held for reference. I think you used the term Lookup Wizard when
you were actually referring to the Combobox Wizard. Yup. When you have
wizards enabled on the Toolbox then placing a combobox on your Form (not
Table) will cause it to spring to life and ask what you want to do.
Nomenclature is important. Fields only occur in tables. The things on
forms are Controls. Controls can be bound to fields. Lots of folks use the
terms as though they were interchangeable. They aren't.
Lookup tables good; Lookup Fields BAD. All is well.
My other favorite rant is about the mis-use of the Autonumber type. You can
google for it or find it on
www.mvps.org/access
HTH
--
-Larry-
--
"my-wings" <my******@TAKEOUTatt.net> wrote in message
news:fq*********************@bgtnsc05-news.ops.worldnet.att.net...
I've been reading about how evil Lookup fields in tables are, but I've got
to be missing something really basic. I know this subject has been covered
before, because I've just spent an hour or two reading about it on google,
but there is something I still don't understand, and I'm hoping someone
will be willing to explain it to me in small words.
Let's say I have a table for addresses, and it includes a field for state.
What I would normally do is create a table of state abbreviations and use
the lookup wizard to link to it. Then, when I make a form for data entry
based on the address table, the field for states appears as a drop down
list.
So, what happens if I don't do the lookup table for "state"? I assume I
still need a table of state abbreviations, but ... how do I get the
information from my state table into my address table? What actually winds
up "in" the address table state field? Just text?
What I'm afraid of is that the answer somehow involves using visual basic
to take the info from the form and put it into the address table, rather than
directly updating the table from the form. And I don't know visual basic.
Does this mean I'm doomed to crappy design until I learn it?
Thanks for any clarification anyone wants to provide....