Relationsships and LookupWizard

A

Andy

Hi

If I use lookup wizard to get information from another tabel in my database,
does this enable a relationship between the 2 tables in question?
And if yes, what is then the difference between this and using relationships
window to establish relationships?

/Andy
 
R

Roger Carlson

This does NOT establish a relationship. It is simply a query. A true
relationship will have Referential Integrity enabled, which prevents
orphaned records from being created.

Never use the lookups at the table level. This breaks the 2nd Commandment
of Access:
http://www.mvps.org/access/tencommandments.htm

It was a bad idea to begin with and hasn't gotten any better. Your users
should never see the tables. They should only see the tables through forms
and reports.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
A

Andy

Ok thanks

What Iæm currently doing is that I have a table with all our application
information in.
And a table with all our employees. If I have a field in the application
table which holds the SystemOwner, and this can be one of the employees in
the employee table, how would I integrate that into the application table?

/Andy
 
R

Roger Carlson

Your employee table should have an Autonumber field as a primary key. Call
it EmployeeID. In the SystemOwner field of the application table, store the
number which corresponds to the proper employee. Create a relationship (in
the Relationship Window) on these fields between these two tables.

Now, on a form, use a Combo box which displays the EmployeeName of the
selected employee, but actually stores the EmployeeID. The Combobox Wizard
can help you do this, but essentially, you create a Row Source query that
includes the EmployeeID and EmployeeName, but make the ColumnWidths = 0,1
and also make the BoundColumn = 1. This will display the second column
(name) but store the first column (EmployeeID).

HTH

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
A

Andy

Hi Roger

So what you're essentially doing is that you use the unic fields as basis
for the relationship. And then base your queries on those unic IDs and
displays the name that belongs to the ID?

/A.
 
Top