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  

A field value dependant on which table another field value is in



 
 
Thread Tools Display Modes
  #1  
Old March 14th, 2005, 08:23 PM
BocaDavid
external usenet poster
 
Posts: n/a
Default A field value dependant on which table another field value is in

How can I have the value of a field depend upon which table the value of
another field can be found in?

e.g. Table 1: [field 1 if value of field 2 is in table 2, then = 2, if 3,
then = 3] [field 2= a]

Table 2 has a, b, c,
Table 3 has c, d, e

Field 1 in table 1 would = 2
  #2  
Old March 14th, 2005, 11:51 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Mon, 14 Mar 2005 11:23:03 -0800, BocaDavid
wrote:

How can I have the value of a field depend upon which table the value of
another field can be found in?

e.g. Table 1: [field 1 if value of field 2 is in table 2, then = 2, if 3,
then = 3] [field 2= a]

Table 2 has a, b, c,
Table 3 has c, d, e

Field 1 in table 1 would = 2


I'd STRONGLY suggest that you *stop*, step back, and reconsider your
table design. The mere need to ask this question suggests that your
tables are not properly normalized, and that you're storing data in
table names. Could you explain what these Table2 and Table3 represent?

There would be *no* easy way to do this automatically; you would need
some fairly complex queries or VBA code, and the value you stored in
Table1 would immediately be wrong if either other table were updated.
For that matter, what would the Table1 field contain if *both* Table2
and Table3 contained a?

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Seeking some expert advice. HD87glide Using Forms 14 March 23rd, 2005 11:11 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 05:11 AM
Duplicate data Rob Green Database Design 3 November 7th, 2004 04:08 AM
Access & OleDb - generating schema changes, problem with identity/counter fields. Thomas Tomiczek [MVP] Database Design 9 November 5th, 2004 11:32 AM
COMPARE THE TWO TABLES Stefanie General Discussion 0 June 4th, 2004 04:36 PM


All times are GMT +1. The time now is 12:11 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.