Lookups

K

kgriba

I am super new to Access, but am seasoned in Excel... have come to a point
were I think my Excel doc should really be in Access... so I'm trying it out.

I see that Lookups in Access are not the same thing as they are in Excel, but
I want to be able to, in Access, lookup a value and its corresponding piece
of information as can be done in an Excel lookup function.

I suspect that I am tackling it wrong... my mind is so Excel... can anyone
point me in the right direction to at least get me started? I'm not having
much luck using the Help feature in Access, as all it does of course is
explain the Access version of a Lookup.

Thanks!
 
P

Philip Herlihy

kgriba said:
I am super new to Access, but am seasoned in Excel... have come to a point
were I think my Excel doc should really be in Access... so I'm trying it out.

I see that Lookups in Access are not the same thing as they are in Excel, but
I want to be able to, in Access, lookup a value and its corresponding piece
of information as can be done in an Excel lookup function.

I suspect that I am tackling it wrong... my mind is so Excel... can anyone
point me in the right direction to at least get me started? I'm not having
much luck using the Help feature in Access, as all it does of course is
explain the Access version of a Lookup.

Thanks!

I think you've had the key insight, and you're certainly asking the
right questions. Access is FAR better suited to this sort of operation,
but it can be daunting to get started. Instead of ranges and lookups,
think "Tables and Queries". Prior to Access 2003, the built-in Help was
a superb textbook, provided you read the sections from the contents page
strictly in order. So, you need something to give you an overview and a
basis for further study. I rather like the video tutorials on Lynda.com.

See:
http://movielibrary.lynda.com/html/modPage.asp?ID=98 (2003)
http://movielibrary.lynda.com/html/modPage.asp?ID=481 (2007)
The first few lessons (free) are a good start.

Otherwise you'll need a book. Most good books are a foot thick, but
don't be daunted - full mastery of Access is a long journey but you can
be doing really useful things quite soon. It's well worth the effort.

Here's my sketch of Access:

You store information divided into Tables, which are carefully designed
("Normalised") to allow maximum flexibility. You use Queries to select
information from one or more tables, based on criteria. That much is
true of any "relational" database. Access also provides Forms to make
data entry and extraction easier, and Reports which lay out extracted
information for printing. There is also a programming facility (think
formulae, and build on that) and other bolt-ons. Lots of wizards and
"builders" to help you throughout. The best place to start is
understanding how to carve up your data the best way into tables, and
how to create a Query in Design View (the "Query Builder").

Phil, London
 
J

John W. Vinson

I am super new to Access, but am seasoned in Excel... have come to a point
were I think my Excel doc should really be in Access... so I'm trying it out.

I see that Lookups in Access are not the same thing as they are in Excel, but
I want to be able to, in Access, lookup a value and its corresponding piece
of information as can be done in an Excel lookup function.

I suspect that I am tackling it wrong... my mind is so Excel... can anyone
point me in the right direction to at least get me started? I'm not having
much luck using the Help feature in Access, as all it does of course is
explain the Access version of a Lookup.

Thanks!

Philip's given you a good thumbnail overview; below are some more resources.
Do be aware that Access is emphatically NOT "Excel on steroids"; the tools
(VLookup say) that you would routinely use in Excel are inappropriate in
Access! There is a DLookUp function but it is actually rather uncommon to need
it! Instead you will use Tables related by Queries to pull information
together.

For some tutorials see

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials
 
K

kgriba

Thanks everyone! Yes, I clearly get the sense that a new way of thinking
about a problem needs to be embraced by my Excel-steeped brain! I will take a
look at the links you have all sent. I think part of my problem has also been
that I don't know where to look as I do not yet have enough Access lingo
under my belt to ask the right questions in the first place.

A bit more on the problem I am trying to tackle:

I work for a developer and we build condominiums. If, for example, I have a
listing of 130 units being built in a building, but within that listing of
130 units, there may only be a total 6 unique floorplans.

So to that end, I created a table listing the 6 unique floorplan types, each
with their respective specifications, such as square footage, bedroom count,
bathroom, count, etc.

Then I created a second table, listing all 130 units in the entire building,
each unit given a number for addressing purposes. I then want to assign each
unit a floorplan type (I did this easily enough with an Access lookup and
linking to the first table I just mentioned above) but then I want the
subsequent columns to automatically reflect the remainder of the specs, that
is, just by initially assigning the suite a floorplan type, the subsequent
columns show the square footages, bedroom count, etc.

Hmmmm... maybe I pull this together in a final report? Because the
relationship has already been made... hmmm... I will try that...

Eventually, I want to move this towards tracking the customers that
purchased each unit, what they paid, and what their respective finishes and
upgrades, and upgrades costs, are for their new suite. I want to, through the
reports feature of Access, be able to (i) look up all the info associated
with a customer, and (ii) alternately look up the info associated with a
suite.

Anyways, thanks again everyone, I will do some more reading, vid watching
and experimentation to see what I can come up with.

Cheers,
Kristine
 
P

Philip Herlihy

kgriba said:
Thanks everyone! Yes, I clearly get the sense that a new way of thinking
about a problem needs to be embraced by my Excel-steeped brain! I will take a
look at the links you have all sent. I think part of my problem has also been
that I don't know where to look as I do not yet have enough Access lingo
under my belt to ask the right questions in the first place.

A bit more on the problem I am trying to tackle:

I work for a developer and we build condominiums. If, for example, I have a
listing of 130 units being built in a building, but within that listing of
130 units, there may only be a total 6 unique floorplans.

So to that end, I created a table listing the 6 unique floorplan types, each
with their respective specifications, such as square footage, bedroom count,
bathroom, count, etc.

Then I created a second table, listing all 130 units in the entire building,
each unit given a number for addressing purposes. I then want to assign each
unit a floorplan type (I did this easily enough with an Access lookup and
linking to the first table I just mentioned above) but then I want the
subsequent columns to automatically reflect the remainder of the specs, that
is, just by initially assigning the suite a floorplan type, the subsequent
columns show the square footages, bedroom count, etc.

Hmmmm... maybe I pull this together in a final report? Because the
relationship has already been made... hmmm... I will try that...

Eventually, I want to move this towards tracking the customers that
purchased each unit, what they paid, and what their respective finishes and
upgrades, and upgrades costs, are for their new suite. I want to, through the
reports feature of Access, be able to (i) look up all the info associated
with a customer, and (ii) alternately look up the info associated with a
suite.

Anyways, thanks again everyone, I will do some more reading, vid watching
and experimentation to see what I can come up with.

Cheers,
Kristine

This may be easier than you expect. If you've correctly designed your
tables (sounds like you have) then each suite in one table, and each
floorplan-type in the other, will have an identifier (termed the
"primary key") which is unique. (We often include an Autonumber field
in a table just for this purpose). Then you could add a column in the
Suites table called "type" which will be assigned the identifier ("key")
of one of the floorplan types.

Worth noting in this case that you'd only do this way if Types really
are fixed - if the square footage varied, for example, you could end up
with an infinite number of Types, which isn't neat. But if the
"Balmoral" suite always has 5 rooms and 120 square feet and a blue
bathroom then you can think of those attributes as "dependent" on the
name "Balmoral". An important principle is that each table represents
an "entity" which makes sense and "hangs together" - and you often need
more tables than you'd first have thought.

Anyway - you have to tell Access that the "Types" field in the "Suites"
table corresponds to primary keys in the "Types" table. Access will
sometimes guess correctly if the field names are the same, but you can
set up a relationship by dragging fields between tables in the
"Relationships" panel (preferred). Alternatively, you can do the same
(just for one query) in the Query Builder. You "add" both tables to the
query, then drag one field to the corresponding field in the other
table. Then Access knows how to link the two tables.

Then, in the middle part of the Query Builder, simply drag the fields
you want onto the matrix. You can refine this by adding sorting and
conditions (later) but when you run the query you'll get just what you
want. At this point you'll be hooked, and you'll wonder why anyone
tries to do this in Excel.

Terminology - an Access "report" is a separate entity (based on a query)
which formats the output for printing. When you're ready to fool around
with this, stick to the Report Wizard!

Anyway, you'll need to read up, or watch some videos, and try a few
things. Note the "backup" option under the File menu!

Phil
 
J

John W. Vinson

Then I created a second table, listing all 130 units in the entire building,
each unit given a number for addressing purposes. I then want to assign each
unit a floorplan type (I did this easily enough with an Access lookup and
linking to the first table I just mentioned above) but then I want the
subsequent columns to automatically reflect the remainder of the specs, that
is, just by initially assigning the suite a floorplan type, the subsequent
columns show the square footages, bedroom count, etc.

Actually... no, you don't!

Your second table should have a *SINGLE FIELD* for the Floorplan ID. It should
not have *ANY* fields from the floorplan table - it should not contain the
square footage, or the bedroom count, or any other info which exists in the
floorplan table.

WHAT!? you say; "if it's not in the table how can I see it!?"

Simple. You never look at Tables. Tables aren't for user interaction! They're
for data storage, and data storage ONLY.

You would interact with the data using a Form (probably with subforms); you
would print things out using a Report, based on a Query joining your units
table to the floorplans table by the FloorplanID.

Relational databases use the "Grandmother's Pantry Principle": "A place - ONE
place! - for everything, everything in its place". Your Tables will end up
looking really cryptic, many of the fields will just be meaningless numbers,
links to data stored in other tables. *But that's all right* - you don't NEED
to look at the tables, that's what Queries, Forms and Reports do.
 
K

kgriba

Thanks John and Philip... would it be fair to say that Access is the more
substantial app in comparison to Excel?

It's probably tough getting started, but once one has a conceptual
understanding and a handle on the techical side of the "how to," I can see
where knowing Access would be a highly desirable skill in any work
environment.

Thanks agian for all your help. Wish me luck!

All the best,
Kristine
 
J

John W. Vinson

Thanks John and Philip... would it be fair to say that Access is the more
substantial app in comparison to Excel?

It's different. There are plenty of things you can do in Excel that you can't
do (or at least can't do as easily or as well) as in Access, and vice versa.
Excel is a spreadsheet, best of breed; Access is a relational database
development environment. It's like comparing a drill press to a table saw.
It's probably tough getting started, but once one has a conceptual
understanding and a handle on the techical side of the "how to," I can see
where knowing Access would be a highly desirable skill in any work
environment.

Yep. If you need to drill custom size and position holes... you don't want to
use a table saw! said:
Thanks agian for all your help. Wish me luck!

Good luck, and don't hesitate to come back if you need more help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top