From: dar on
Hello-
I would like to see how I can add a calcualted field to my forms that would
show me when an employee is eligible for benefits. I have employee who
qualify in 30 days, others are 90 days.

Your help is appreciated!
Thank you,
From: John W. Vinson on
On Wed, 14 Apr 2010 15:27:02 -0700, dar <dar(a)discussions.microsoft.com> wrote:

>Hello-
>I would like to see how I can add a calcualted field to my forms that would
>show me when an employee is eligible for benefits. I have employee who
>qualify in 30 days, others are 90 days.
>
>Your help is appreciated!
>Thank you,

30 days from.... what? Hiredate? How can you determine (from data in the
table) whether it should be 30 or 90 days? What do you want to see on the
form: a date, the word ELIGIBLE in a textbox, both, something else?

Remember - we know nothing about either your business or your database except
what you tell us.

--

John W. Vinson [MVP]
From: Beetle on
One option would be to create a query based on the relevant table
then add a calculated field to the query. You would then use the query
as the record source of the form. You could also put a calculated control
on the form, but, depending on the design of the form, the query
may be the better choice.

It's difficult to give much advice on how to calculate the value you
need since we don't know anything about your tables/data, but it
might look something like the following (as a calculated field
in a query);

EligibleDate: IIf([EmployeeType] = "Full Time", DateAdd("d", 30, [HireDate],
DateAdd("d", 90, [HireDate]))

(the above would be all on one line in the field row of a column in
the query design grid).
--
_________

Sean Bailey


"dar" wrote:

> Hello-
> I would like to see how I can add a calcualted field to my forms that would
> show me when an employee is eligible for benefits. I have employee who
> qualify in 30 days, others are 90 days.
>
> Your help is appreciated!
> Thank you,
From: KARL DEWEY on
You omitted some information so I will guess. You need a HireDate and
Eligible field with the number of days, or a category for eligiblity.

With Eligible field having number of days for eligibility --
Benefits Eligible: IIF(DateDiff("d", HireDate, Date()) >= [Eligible],
"Yes", [Eligible] - DateDiff("d", HireDate, Date()) & " Days")

For a category in the Eligible field then you need an IIF statement to
translate category to days or a table to do it if you have a lot of different
possibilities.

--
Build a little, test a little.


"dar" wrote:

> Hello-
> I would like to see how I can add a calcualted field to my forms that would
> show me when an employee is eligible for benefits. I have employee who
> qualify in 30 days, others are 90 days.
>
> Your help is appreciated!
> Thank you,
From: dar on
Yes, managers are 30 days from hire date, clerks are 90 days from hire date.

"John W. Vinson" wrote:

> On Wed, 14 Apr 2010 15:27:02 -0700, dar <dar(a)discussions.microsoft.com> wrote:
>
> >Hello-
> >I would like to see how I can add a calcualted field to my forms that would
> >show me when an employee is eligible for benefits. I have employee who
> >qualify in 30 days, others are 90 days.
> >
> >Your help is appreciated!
> >Thank you,
>
> 30 days from.... what? Hiredate? How can you determine (from data in the
> table) whether it should be 30 or 90 days? What do you want to see on the
> form: a date, the word ELIGIBLE in a textbox, both, something else?
>
> Remember - we know nothing about either your business or your database except
> what you tell us.
>
> --
>
> John W. Vinson [MVP]
> .
>