Group:  Microsoft Access ยป microsoft.public.access.gettingstarted
Thread: Performing subtraction on 2 fields to fill another

Performing subtraction on 2 fields to fill another
Guanamom 12/24/2008 9:27:01 PM
I am so frustrate with Access. This is so simple in Lotus Approach. Any one
help me? I have 2 date fields and I want to calculate the number of days and
have the result appear in a 3rd field. The expression builder is not showing
the tables in my DB, and so I cannot use that method! Why doesn't Mocrosoft
just add a calculated field like Approach has!
Re: Performing subtraction on 2 fields to fill another
"Steve" <nonsense[ at ]nomsense.com> 12/24/2008 9:36:55 PM
Look at the DateDiff function in the Help file.

Steve


"Guanamom" <Guanamom[ at ]discussions.microsoft.com> wrote in message
news:32A6C8BD-7B93-42AC-B199-81BCB3ED9821[ at ]microsoft.com...
[Quoted Text]
>I am so frustrate with Access. This is so simple in Lotus Approach. Any one
> help me? I have 2 date fields and I want to calculate the number of days
> and
> have the result appear in a 3rd field. The expression builder is not
> showing
> the tables in my DB, and so I cannot use that method! Why doesn't
> Mocrosoft
> just add a calculated field like Approach has!


Re: Performing subtraction on 2 fields to fill another
Rick Brandt <rickbrandt2[ at ]hotmail.com> 12/24/2008 9:44:16 PM
On Wed, 24 Dec 2008 13:27:01 -0800, Guanamom wrote:

[Quoted Text]
> I am so frustrate with Access. This is so simple in Lotus Approach. Any
> one help me? I have 2 date fields and I want to calculate the number of
> days and have the result appear in a 3rd field. The expression builder
> is not showing the tables in my DB, and so I cannot use that method! Why
> doesn't Mocrosoft just add a calculated field like Approach has!

It is very simple to do this (in a query). The results of such
calculations do not belong in tables.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Re: Performing subtraction on 2 fields to fill another
Guanamom 12/24/2008 10:06:01 PM
Tried that, steve, but it just wont take it. Like I said, the table fields
are not even showing up in the expression builder. Is there something that
has to be turned on?

Diane

"Steve" wrote:

[Quoted Text]
> Look at the DateDiff function in the Help file.
>
> Steve
>
>
> "Guanamom" <Guanamom[ at ]discussions.microsoft.com> wrote in message
> news:32A6C8BD-7B93-42AC-B199-81BCB3ED9821[ at ]microsoft.com...
> >I am so frustrate with Access. This is so simple in Lotus Approach. Any one
> > help me? I have 2 date fields and I want to calculate the number of days
> > and
> > have the result appear in a 3rd field. The expression builder is not
> > showing
> > the tables in my DB, and so I cannot use that method! Why doesn't
> > Mocrosoft
> > just add a calculated field like Approach has!
>
>
>
Re: Performing subtraction on 2 fields to fill another
John W. Vinson <jvinson[ at ]STOP_SPAM.WysardOfInfo.com> 12/24/2008 10:25:14 PM
On Wed, 24 Dec 2008 13:27:01 -0800, Guanamom
<Guanamom[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>I am so frustrate with Access. This is so simple in Lotus Approach. Any one
>help me? I have 2 date fields and I want to calculate the number of days and
>have the result appear in a 3rd field. The expression builder is not showing
>the tables in my DB, and so I cannot use that method! Why doesn't Mocrosoft
>just add a calculated field like Approach has!

Access is NOT a flawed implemenation of Approach. It is a different program,
with different conventions! If you insist on treating it as a version of
Approach you will indeed be frustrated; if you meet it on its own terms, you
will find that it does everything that Approach can do - but *differently*.
You may need to "unlearn" some things!

That said: create a Query based on the table. Include the two date fields, and
any other information that you would like to see. In a vacant Field cell type

DaysBetween: DateDiff("d", [firstdatefield], [seconddatefield])

using whatever fieldname you would like.

you can now base a Form or Report on this query and see the result you want.

Note that tables (in Access, if not in Approach) are designed for data storage
- not for calculations, and not for data presentation or interaction either.
--

John W. Vinson [MVP]
Re: Performing subtraction on 2 fields to fill another
"Steve" <nonsense[ at ]nomsense.com> 12/26/2008 6:17:20 PM
Diane,

See John Vinson's response in this thread. Suggest you still look at the
DateDiff function in the Help file.

Steve


"Guanamom" <Guanamom[ at ]discussions.microsoft.com> wrote in message
news:10BAB732-5F4F-4700-AB37-6FFA9D84D933[ at ]microsoft.com...
[Quoted Text]
> Tried that, steve, but it just wont take it. Like I said, the table fields
> are not even showing up in the expression builder. Is there something that
> has to be turned on?
>
> Diane
>
> "Steve" wrote:
>
>> Look at the DateDiff function in the Help file.
>>
>> Steve
>>
>>
>> "Guanamom" <Guanamom[ at ]discussions.microsoft.com> wrote in message
>> news:32A6C8BD-7B93-42AC-B199-81BCB3ED9821[ at ]microsoft.com...
>> >I am so frustrate with Access. This is so simple in Lotus Approach. Any
>> >one
>> > help me? I have 2 date fields and I want to calculate the number of
>> > days
>> > and
>> > have the result appear in a 3rd field. The expression builder is not
>> > showing
>> > the tables in my DB, and so I cannot use that method! Why doesn't
>> > Mocrosoft
>> > just add a calculated field like Approach has!
>>
>>
>>


Home | Search | Terms | Imprint
Newsgroups Reader