By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,312 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,312 IT Pros & Developers. It's quick & easy.

default values

P: n/a
i have three columns
hrs_due, hrstaken, and totalhrsneeded
i need the default value of hrs_due to = totalhrsneeded - hrstaken
the data type of all is number>long integer, and i try to key =[totalhrsneeded]-[hrstaken] into the default value of hrs_due but it
will not accept it can anyone plz help??
thanks

Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You will need to enter the data from a form and set the default value from
code that works with the form -- AfterUpdate events of the factors and the
BeforeUpdate event of the form. You cannot set the default you want in the
field definition in the table.

Larry Linson
Microsoft Access MVP
<jj****@earthlink.net> wrote in message
news:Zi*******************@newsread1.news.pas.eart hlink.net...
i have three columns
hrs_due, hrstaken, and totalhrsneeded
i need the default value of hrs_due to = totalhrsneeded - hrstaken
the data type of all is number>long integer, and i try to key =[totalhrsneeded]-[hrstaken] into the default value of hrs_due but it will not accept it can anyone plz help??
thanks

Nov 13 '05 #2

P: n/a
rkc

<jj****@earthlink.net> wrote in message
news:Zi*******************@newsread1.news.pas.eart hlink.net...
i have three columns
hrs_due, hrstaken, and totalhrsneeded
i need the default value of hrs_due to = totalhrsneeded - hrstaken
the data type of all is number>long integer, and i try to key =[totalhrsneeded]-[hrstaken] into the default value of hrs_due but it will not accept it can anyone plz help??


If you're talking about the value of a column in the design of a table,
you can't reference a column in a table as a default value for another
column. As a general rule you wouldn't store a value that can be
calculated from other columns in the same table any way.
Nov 13 '05 #3

P: n/a
you can't do a formula like in excel, to make the value of one field, the difference between two other fields???
that sux but thanks
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message news:JG*******************@twister.nyroc.rr.com...

<jj****@earthlink.net> wrote in message
news:Zi*******************@newsread1.news.pas.eart hlink.net...
i have three columns
hrs_due, hrstaken, and totalhrsneeded
i need the default value of hrs_due to = totalhrsneeded - hrstaken
the data type of all is number>long integer, and i try to key

=[totalhrsneeded]-[hrstaken] into the default value of hrs_due but it
will not accept it can anyone plz help??


If you're talking about the value of a column in the design of a table,
you can't reference a column in a table as a default value for another
column. As a general rule you wouldn't store a value that can be
calculated from other columns in the same table any way.

Nov 13 '05 #4

P: n/a
<jj****@earthlink.net> wrote in message
news:9L*******************@newsread1.news.pas.eart hlink.net...
you can't do a formula like in excel, to make the value of one field, the difference between two other fields??? that sux but thanks


if it's very important to you then you could use sql server which supports
calculated columns.
Nov 13 '05 #5

P: n/a
rkc

<jj****@earthlink.net> wrote in message
news:9L*******************@newsread1.news.pas.eart hlink.net...
you can't do a formula like in excel, to make the value of one field, the

difference between two other fields???

Using a form yes. In the design of a table, no.
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.