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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Auto enter data into 2 fields
I have 2 tables: TBL_Corporate and TBL_Client. We enter the corporate name,
etc.. in the first table but in the second table if we enter the CORP ID it will link those 2 tables. Is there a way if I enter CORP ID as 77 that it will auto enter the Corporate name from the first table into the second table? |
#2
|
|||
|
|||
Auto enter data into 2 fields
Not if you're entering information directly into the tables, because tables
don't have events you can trap. You'd need to enter your data through a form, where you could trap the AfterUpdate event on the control bound to the CORP ID field and write VBA code to insert the Corporate name. That said, you can do it that way, but you shouldn't. If you have the CORP ID in the TBL_Client, why do you need to store the Corporate name there also? Just do a lookup on the CORP ID from TBL_Corporate any time you need the name. Carl Rapson "C. Sharp" wrote in message ... I have 2 tables: TBL_Corporate and TBL_Client. We enter the corporate name, etc.. in the first table but in the second table if we enter the CORP ID it will link those 2 tables. Is there a way if I enter CORP ID as 77 that it will auto enter the Corporate name from the first table into the second table? |
#3
|
|||
|
|||
Auto enter data into 2 fields
On Tue, 8 May 2007 14:21:01 -0700, C. Sharp
wrote: I have 2 tables: TBL_Corporate and TBL_Client. We enter the corporate name, etc.. in the first table but in the second table if we enter the CORP ID it will link those 2 tables. Is there a way if I enter CORP ID as 77 that it will auto enter the Corporate name from the first table into the second table? You shouldn't. Relational databases use the "Grandmother's Pantry Principle" - "a place - ONE place! - for everything, everything in its place". Store the Corp_ID in the Client table; if you need to see the corporation name in conjunction with client data, use a Combo Box storing the ID but displaying the name, or use a Query joining the two tables. John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|