criteria in a table? not in a query is this possible?

stafire_18

Board Regular
Joined
Dec 8, 2004
Messages
162
I have a form that is entering information into a table. on that form is there away to calculate a field like if it were a query? so that when the record is saved the calculated field is saved also?

I know how to do this within a query but am not sure if it is avilable to do for a table?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You shouldn't really store calculated values in a table.

Any calculations should be done using queries.
 
Upvote 0
Perhaps if we understand what you are trying to do and why, it will make more sense and we will be able to devise a good solution.

Why do you need it to write back to the table, and not use a query calculated field, like Norie suggested?
 
Upvote 0
ok. i need a field to determin when the request was submitted (today) and how far it goes back. for example say a member is wanting to cancel their insurance policy back to 2/1/06. in a query i can have this calculated but then i'll probably have to create different tables to house allthe approvals/ not approved. if i can calculate this 1 field in a table then 1 table is all i'll need to house everything. i think i'm honestly looking too into this process... basic mdb. enter a record. go in & approve & save record. but i would like it to show how many days it will go back. your suggestions on what i should do. should i create different quieries to create a "approved" table & a "not approved yet" tables?
 
Upvote 0
Difference

If your really want to do it. In your table make a field called e.g. Difference. In your form make a textbox (called CalcDifference) that in the Query Builder, uses DateDiff("d",[RequestSubmitted],[CancelTo]).

Then in the After Update event of say the CancelTo field, Put Me.Difference = Me.CalcDifference. This will put the result in your table.

Whether it's any help, I'm not sure.
 
Upvote 0

Forum statistics

Threads
1,222,246
Messages
6,164,805
Members
451,917
Latest member
WEB78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top