Can I do a calculation on a field in a form? (1 Viewer)

J

julia

Guest
Using Access 2000 on Win98SE

I have table Current Callsigns and form derived from it.

I have table Cards and Envelopes and form derived from it.

Form Current Callsigns has form Cards and Envelopes on it as a subform.

Fields in Cards and Envelopes as follows:-

CallID (many to one relationship to same field in Current Callsigns), COS
(cards opening stock), CR (cards received), CS (cards sent), COH (cards on
hand).
I want to make an expression so that the field COH ( and a similarly constructed field called EOH)is automatically
calculated for me, along the lines of =[COS]+[CR]-[CS] I have tried various
ways (onupdate, beforeupdate etc) but am getting precisely nowhere. Can any
of you kind and knowledgeable people help me with this please? I'm not technical when it comes to bound boxes and calculated controls - I have to learn from the help in Access which ain't always very helpful !!!

It would also save me a lot of keying if I could automatically insert
today's date or the system date into the field CRD (cards received date)
when I am entering data into a record. I can see how to do this if I want
it on the whole form, but not if I want it in a particular field. Is there
a way to do this?

Many thanks,

Jools
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:25
Joined
Feb 19, 2002
Messages
43,223
It is not good practice to store calculated fields. You can easily calculate them in queries, forms, and reports so there is no need to store them.

As to the second question. You can specify a default value for a control. To store the date and time, use:
=Now()
To store just the date, use:
=Date()
 

Users who are viewing this thread

Top Bottom