Help with If then statement

G

Guest

I am attempting to set up a HR Performance form in access 2003. For each
employee I want to be able to select a performance level [perfrate] from a
combo box field (5 choices) and a quartile [qrtle] from another combo box
field (4 choices). Based on the combination I want to restrict the values
that can be entered in a filed for percentage of increase. Here is part of
the pseudo code of what I'm trying to accomplish.

Performance Rating = 2
PerfRate = 2 and Qrtle = 1: Percent is Between 0-2%
If Percent > 2% then
Display “Increase Percent exceeds permitted range supervisor’s signature
requiredâ€
Else
If Percent < 0% then
Display popup warning “Please enter amount within permissible rangeâ€
End If

PerfRate = 2 and Qrtle = 2: Percent is Between 0-1% ...
there are 20 possible combinations. Thanks
 
Y

Yumex85

hmmm
the only thing that comes on my mind would be making a table of your
possible combinations(20 in ur case).
1 column for the first combo, 1 column for second combo and 1 column
for the range permitted.
Then you can run a query checking the table to see the correct range
permitted.

When the person select the range field , you trigger the event where
you would run a query like "select range from table where combo1 =
choiceX and combo2 = choiceY"
-save the range in a global variable.
- after the range field updated, you check if the range entered by the
user is permitted comparing with the value u kept in ur global value.
 
S

sbg2 via AccessMonster.com

Can you make a combination field in Access? For example MyComboField =
PerfRate & "~" & Qrtle. If each record in a new table would then have a
primary key field that would equal PerfRate & "~" & Qrtle couldn't you then
use a relationship to see if the PercentIncrease was greater than the Min &
Max percentages defined in the new table?

two tables related on PerfRate_Qrtle as such?

tbl_Employee
ID_Employee
PerfRate
Qrtle
PerfRate_Qrtle (calculated field = PerfRate & "~" & Qrtle)
PercentIncrease

tbl_PerformancePercentages
ID_PerformancePercentages
PerfRate_Qrtle
Min
Mix
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top