Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 16th, 2005, 02:52 PM
gino5555 gino5555 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 gino5555 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 13 sec
Reputation Power: 0
Exclamation Access 2000 Define Variable Field Lookup

How do I get Access to automatically return a table value using 2 expression critera? I need the query to return the % that an employee is vested based on the years of service (03 SY matching Vesting Schedule Column) so I can use it in another calculation in another query.

Below is the revelant information that I am using in the query:

SERVICE YEARS
EE# (employee number)
04 SY (years of service for 2004 - calculated then transferred)
03 SY (ditto for 2003)

EMPLOYEE
EE#
Last Name, first name, etc
Sort Name

2003 ANNUAL REPORT
Sort Name
Vest Name

VEST SCHEDULE
Vest Name
1 (schedule of %'s based on Vest Name and 1 year of service)
2 (schedule of %'s based on Vest Name and 2 years of service)
3
4
5
6
7
8
9
10 (after 10 years the EE is 100% vested)

RELATIONSHIPS
Service Years linked to Employees via EE#
Employees linked to 2003 Annual Report through Sort Name
2003 AR linked to Vesting Schedule through Sort Name

I need the query to return the % that an employee is vested based on the years of service (03 SY matching Vesting Schedule Column) so I can use it in another calculation in another query.

When I do this in Excel I use the VLookup and Match combined where the Match returns the column number and the VLookup then returns the %. I'm sure this is possible in Access, but can't figure it out. I'm not new to Access, but haven't used it in a few years and am a bit rusty.

Reply With Quote
  #2  
Old June 30th, 2005, 08:38 AM
sherrington sherrington is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 85 sherrington User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 4 m 52 sec
Reputation Power: 5
Would DLookup do what you need?

Reply With Quote
  #3  
Old June 30th, 2005, 09:26 AM
gino5555 gino5555 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 gino5555 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 13 sec
Reputation Power: 0
DLookup won't really work in this case because the VEST SCHEDULE table is not normazlied. I didn't set up this database, so I had no control over that.

I also posted on another website that already answered by question. Nothing else was linked to that table, so I redid it in a nomalized fashion then the DLookup worked.

As a temporary work around I did a long IFF statement to go with each year.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Access 2000 Define Variable Field Lookup


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway