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  

Access Table Design



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2009, 06:50 AM posted to microsoft.public.access.tablesdbdesign
Paul
external usenet poster
 
Posts: 24
Default 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  
Old April 21st, 2009, 07:21 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old April 21st, 2009, 04:12 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old April 21st, 2009, 08:39 PM posted to microsoft.public.access.tablesdbdesign
Roger Carlson
external usenet poster
 
Posts: 824
Default 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  
Old April 21st, 2009, 10:33 PM posted to microsoft.public.access.tablesdbdesign
Armen Stein
external usenet poster
 
Posts: 507
Default 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  
Old April 22nd, 2009, 05:18 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old April 22nd, 2009, 06:37 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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

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


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