PC Review


Reply
Thread Tools Rate Thread

Calculated field in Forms

 
 
dar
Guest
Posts: n/a
 
      14th Apr 2010
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,
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      14th Apr 2010
On Wed, 14 Apr 2010 15:27:02 -0700, dar <(E-Mail Removed)> 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]
 
Reply With Quote
 
Beetle
Guest
Posts: n/a
 
      15th Apr 2010
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,

 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      15th Apr 2010
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,

 
Reply With Quote
 
dar
Guest
Posts: n/a
 
      16th Apr 2010
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 <(E-Mail Removed)> 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]
> .
>

 
Reply With Quote
 
dar
Guest
Posts: n/a
 
      16th Apr 2010
Hello, yes I will have the below fields that you mentioned.

"KARL DEWEY" wrote:

> 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,

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      16th Apr 2010
On Fri, 16 Apr 2010 09:32:01 -0700, dar <(E-Mail Removed)> wrote:

>Yes, managers are 30 days from hire date, clerks are 90 days from hire date.
>


That's a business rule.

It's not a database rule.

I can see how you would enforce that in your office, but since you have chosen
not to post any information about your tables, I cannot tell how you would
enforce it in a database.

I'd love to be able to help, but I can't unless you tell me what's in your
database!
--

John W. Vinson [MVP]
 
Reply With Quote
 
dar
Guest
Posts: n/a
 
      23rd Apr 2010
Sorry about that I am new to this forum.

Tabel: Employee

My fields are:
LName
FName
Hire Date

I would like to set the rule based off of the Hire date.

"John W. Vinson" wrote:

> On Fri, 16 Apr 2010 09:32:01 -0700, dar <(E-Mail Removed)> wrote:
>
> >Yes, managers are 30 days from hire date, clerks are 90 days from hire date.
> >

>
> That's a business rule.
>
> It's not a database rule.
>
> I can see how you would enforce that in your office, but since you have chosen
> not to post any information about your tables, I cannot tell how you would
> enforce it in a database.
>
> I'd love to be able to help, but I can't unless you tell me what's in your
> database!
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
dar
Guest
Posts: n/a
 
      23rd Apr 2010
John i forgot the other fields

Table: Employee
LName
FName
Hire Date
Office Staff 30 days for eligibilty from hire date
Transport 30 days for eligibility from hire date
Manager 30 days for eligibility from hire date
Maint 30 days fro eligibilty from hire date
Clerk 90 days for eligibility from hire date

Will this help?
Thank you John

"John W. Vinson" wrote:

> On Fri, 16 Apr 2010 09:32:01 -0700, dar <(E-Mail Removed)> wrote:
>
> >Yes, managers are 30 days from hire date, clerks are 90 days from hire date.
> >

>
> That's a business rule.
>
> It's not a database rule.
>
> I can see how you would enforce that in your office, but since you have chosen
> not to post any information about your tables, I cannot tell how you would
> enforce it in a database.
>
> I'd love to be able to help, but I can't unless you tell me what's in your
> database!
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
dar
Guest
Posts: n/a
 
      23rd Apr 2010
On my last reply I forgot to put the Eligibility date goes with the info on
put on the titles. Office, transport etc. Eligibility date will be based
off the hire date.

"John W. Vinson" wrote:

> On Fri, 16 Apr 2010 09:32:01 -0700, dar <(E-Mail Removed)> wrote:
>
> >Yes, managers are 30 days from hire date, clerks are 90 days from hire date.
> >

>
> That's a business rule.
>
> It's not a database rule.
>
> I can see how you would enforce that in your office, but since you have chosen
> not to post any information about your tables, I cannot tell how you would
> enforce it in a database.
>
> I'd love to be able to help, but I can't unless you tell me what's in your
> database!
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add calculated field to forms Jack Microsoft Access Getting Started 4 9th Nov 2009 09:09 PM
forms- how can I replace a record field with a calculated field? =?Utf-8?B?RE1D?= Microsoft Access Forms 1 10th Aug 2005 10:30 PM
Same calculated field on two forms =?Utf-8?B?QnJ5YW4=?= Microsoft Access Forms 3 10th Mar 2005 11:59 AM
Calculated field in forms Jeffrey Microsoft Access Forms 4 20th Aug 2003 01:12 AM
Update a Table with a calculated field in Forms vince Microsoft Access Getting Started 3 5th Aug 2003 10:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.