PC Review


Reply
Thread Tools Rate Thread

Carry the field

 
 
Striker3070
Guest
Posts: n/a
 
      2nd Dec 2009
Access 2007, have a table that looks up two fields in another table. Fld1
and Fld2. Fld2 is a description of Fld1. So when the user select Fld1, how
can I get Fld2 to carry on to this new table?

 
Reply With Quote
 
 
 
 
Gina Whipp
Guest
Posts: n/a
 
      2nd Dec 2009
Striker3070,

In a well normalized database you would not store the description in two
tables. You can use DLookup to get the description to display on your form.

If numeric...

=DLookup("Fld2", "YourTable", "[Fld1]=" & Me![Fld1])

If text...

=DLookup("Fld2", "YourTable", "[Fld1]='" & Me![Fld1] & "'")

OR drop the table in the query and display it as part of the query that is
the RecordSource of the form.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Striker3070" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Access 2007, have a table that looks up two fields in another table. Fld1
> and Fld2. Fld2 is a description of Fld1. So when the user select Fld1,
> how can I get Fld2 to carry on to this new table?



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      2nd Dec 2009
On Wed, 2 Dec 2009 08:26:28 -0700, "Striker3070" <(E-Mail Removed)>
wrote:

>Access 2007, have a table that looks up two fields in another table. Fld1
>and Fld2. Fld2 is a description of Fld1. So when the user select Fld1, how
>can I get Fld2 to carry on to this new table?


You wouldn't, ordinarily.

The whole POINT of a relational database is to avoid redundnancy, thereby
avoiding redundancy. Fld2 should exist in the first table *and noplace else*!
Any time you need the information you can use a Query joining the tables, or a
DLookUp as Gina suggests, or a Combo Box storing Fld1 and displaying Fld2.

Storing the description in two different tables wastes space and (worse) risks
data anomalies: if you have the description stored in two tables, it could be
(intentionally, accidentally, even maliciously) edited in one table and not in
the other. You now have two incompatible descriptions for the same thing!
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
carry over field New TO Access Microsoft Access Forms 4 25th Feb 2009 04:12 AM
Carry the Key ID field to subforms when entering new records =?Utf-8?B?SnVzdEplbg==?= Microsoft Access Forms 13 5th Jul 2006 01:43 PM
Date field to carry through all queries? starr.kim@synthes.com Microsoft Access Reports 1 21st Oct 2005 04:49 PM
carry over a value in a field to same field in new record =?Utf-8?B?UmljaDg0?= Microsoft Access VBA Modules 3 18th Aug 2005 03:18 AM
carry forward calculated field... anthony p. Microsoft Access 0 7th Oct 2004 07:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.