A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Easy One: Lookup Column



 
 
Thread Tools Display Modes
  #1  
Old March 29th, 2009, 10:36 AM posted to microsoft.public.access.tablesdbdesign
ant1983
external usenet poster
 
Posts: 67
Default Easy One: Lookup Column

So im starting to build my database and starting with the tables (obviously)...

So lets say i create a database and start with my tables. Lets say the
first table is called "tblEmployee" with the following fields:

- ID (Auto Num and Primary Key)
- FirstName (Text)
- Surname (Text)
- DateOfBirth (Date)
- Department (Lookup Field)

....and the 2nd tableis called "suptblDepartment" with the following fields:

- ID (Auto Num and Primary Key)
- Department (Text)

Now in the 2nd table i populate the Department field with the following
values:

- Human Resources
- IT
- Finance
- Credit Control
- Operations

************************************************

So my questions are in terms of best practice:

1 - When selecting the Lookup Wizard option under Field Type (for Department
in the first table); i select the first option on the first screen; then i
select my table (suptblDepartment) on the 2nd screen; - Then what should i
do? Should i be selecting the ID or Department field?

2 - On the last screen it promts you for a label - what label is this?

3 - On the last screen it also asks you if you want to store multiple values
- What does this mean?

i'm using 2007...

Thanks!

:-)

  #2  
Old March 29th, 2009, 10:07 PM posted to microsoft.public.access.tablesdbdesign
tina
external usenet poster
 
Posts: 1,997
Default Easy One: Lookup Column

the best practice is to *not* use Lookup fields in your tables. for more
information, see http://www.mvps.org/access/lookupfields.htm.

you can use combobox controls or listbox controls in your *forms* with no
problem; and forms are where you should be
entering/editing/deleting/reviewing data, not in tables.

hth


"ant1983" wrote in message
...
So im starting to build my database and starting with the tables

(obviously)...

So lets say i create a database and start with my tables. Lets say the
first table is called "tblEmployee" with the following fields:

- ID (Auto Num and Primary Key)
- FirstName (Text)
- Surname (Text)
- DateOfBirth (Date)
- Department (Lookup Field)

...and the 2nd tableis called "suptblDepartment" with the following

fields:

- ID (Auto Num and Primary Key)
- Department (Text)

Now in the 2nd table i populate the Department field with the following
values:

- Human Resources
- IT
- Finance
- Credit Control
- Operations

************************************************

So my questions are in terms of best practice:

1 - When selecting the Lookup Wizard option under Field Type (for

Department
in the first table); i select the first option on the first screen; then i
select my table (suptblDepartment) on the 2nd screen; - Then what should i
do? Should i be selecting the ID or Department field?

2 - On the last screen it promts you for a label - what label is this?

3 - On the last screen it also asks you if you want to store multiple

values
- What does this mean?

i'm using 2007...

Thanks!

:-)



  #3  
Old March 29th, 2009, 11:37 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Easy One: Lookup Column

On Sun, 29 Mar 2009 02:36:01 -0700, ant1983
wrote:

So im starting to build my database and starting with the tables (obviously)...

So lets say i create a database and start with my tables. Lets say the
first table is called "tblEmployee" with the following fields:

- ID (Auto Num and Primary Key)
- FirstName (Text)
- Surname (Text)
- DateOfBirth (Date)
- Department (Lookup Field)


Before you get too much deeper here read:

http://www.mvps.org/access/lookupfields.htm

Lookup fields are useful primarily to make it easier to enter and edit data in
table datasheets - but in a properly designed Access application users should
never even SEE a table datasheet, much less use one for data entry! They
should use Forms (with combo boxes, natch) instead.

...and the 2nd tableis called "suptblDepartment" with the following fields:

- ID (Auto Num and Primary Key)
- Department (Text)

Now in the 2nd table i populate the Department field with the following
values:

- Human Resources
- IT
- Finance
- Credit Control
- Operations

*********************************************** *

So my questions are in terms of best practice:

1 - When selecting the Lookup Wizard option under Field Type (for Department
in the first table); i select the first option on the first screen; then i
select my table (suptblDepartment) on the 2nd screen; - Then what should i
do? Should i be selecting the ID or Department field?

2 - On the last screen it promts you for a label - what label is this?

3 - On the last screen it also asks you if you want to store multiple values
- What does this mean?


Well, I would never use a lookup field *nor* would I ever use a multivalue
field. If you need help doing so, please ask again, maybe someone without my
biases will help. I will note that neither of these features is ever
*necessary*; you can use a Form with a Combo Box to get the "lookup"
capability, and a related Table with a Subform to get multiple values.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.