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
|
|||
|
|||
Access Table Design
In Access table design is it possible to set the default value on a field
referencing the value to another field in the same table. For example field A and field B, if field A is 1 can I set the default value of field B = field A + 1 and in this case field B should be 2. Thanks. |
#2
|
|||
|
|||
Access Table Design
On Mon, 20 Apr 2009 22:50:37 -0700, "Paul" wrote:
In Access table design is it possible to set the default value on a field referencing the value to another field in the same table. No, it is not. The default value is assigned the instant the new record is created - at which time no other field can possibly have any data. You can use a Form, and use the AfterUpdate event of FieldA's control to set the value (or the DefaultValue property) of the control bound to FieldB. You should be using forms to enter data in any case so this shouldn't be much of a burden! -- John W. Vinson [MVP] |
#3
|
|||
|
|||
Access Table Design
Paul
One of the principles of normalization speaks about not having a second field dependent on a first (I can never remember which # that one is). After all, using your example, if you know the value of FieldA, you automatically know the value of FieldB... so why bother saving a value in FieldB when you can simply calculate it from the value in FieldA?! Regards Jeff Boyce Microsoft Office/Access MVP "Paul" wrote in message ... In Access table design is it possible to set the default value on a field referencing the value to another field in the same table. For example field A and field B, if field A is 1 can I set the default value of field B = field A + 1 and in this case field B should be 2. Thanks. |
#4
|
|||
|
|||
Access Table Design
Third Normal Form or Boyce-Codd Normal Form depending on who you talk to.
-- --Roger Carlson MS Access MVP www.rogersaccesslibrary.com "Jeff Boyce" wrote in message ... Paul One of the principles of normalization speaks about not having a second field dependent on a first (I can never remember which # that one is). After all, using your example, if you know the value of FieldA, you automatically know the value of FieldB... so why bother saving a value in FieldB when you can simply calculate it from the value in FieldA?! Regards Jeff Boyce Microsoft Office/Access MVP "Paul" wrote in message ... In Access table design is it possible to set the default value on a field referencing the value to another field in the same table. For example field A and field B, if field A is 1 can I set the default value of field B = field A + 1 and in this case field B should be 2. Thanks. |
#5
|
|||
|
|||
Access Table Design
On Tue, 21 Apr 2009 15:39:32 -0400, "Roger Carlson"
wrote: Third Normal Form or Boyce-Codd Normal Form depending on who you talk to. Unless it is truly a *default* (OP's wording) that could be changed later. Then even Codd would probably be okay with it. Armen Stein Microsoft Access MVP www.JStreetTech.com |
#6
|
|||
|
|||
Access Table Design
Maybe Codd would be okay with it but I'm not sure about (Jeff) Boyce ;-)
If anyone has a good understanding of Boyce-Codd, it should be someone named Boyce. Just don't ask Duey Hookom how to catch trophy fish! -- Duane Hookom Microsoft Access MVP "Armen Stein" wrote: On Tue, 21 Apr 2009 15:39:32 -0400, "Roger Carlson" wrote: Third Normal Form or Boyce-Codd Normal Form depending on who you talk to. Unless it is truly a *default* (OP's wording) that could be changed later. Then even Codd would probably be okay with it. Armen Stein Microsoft Access MVP www.JStreetTech.com |
#7
|
|||
|
|||
Access Table Design
**DISCLAIMER**
The "Boyce" of "Boyce-Codd" fame is no relation ... or at least none that I'm aware of or wish to claim. Regards Jeff Boyce "Duane Hookom" wrote in message ... Maybe Codd would be okay with it but I'm not sure about (Jeff) Boyce ;-) If anyone has a good understanding of Boyce-Codd, it should be someone named Boyce. Just don't ask Duey Hookom how to catch trophy fish! -- Duane Hookom Microsoft Access MVP "Armen Stein" wrote: On Tue, 21 Apr 2009 15:39:32 -0400, "Roger Carlson" wrote: Third Normal Form or Boyce-Codd Normal Form depending on who you talk to. Unless it is truly a *default* (OP's wording) that could be changed later. Then even Codd would probably be okay with it. Armen Stein Microsoft Access MVP www.JStreetTech.com |
Thread Tools | |
Display Modes | |
|
|