One field changes another

C

cpocpo

Hello!
Just getting started with Access. Have the basic fields set up for an
employee database, but I find I am entering some data several times:

There is one form field named "Paygrade" and then two others named
"Hourly Rate" and "Overtime Rate".

What I would like to do is restrict "Paygrade" to certain values (GS-1
Step 1, GS-1 Step 2, etc.). When those values are selected (by a
dropdown...?), the hourly rate and overtime rates automatically fill -
in.

Right now, I type in the paygrade for one employee and I am typing in
the hourly/OT rates which are the same numbers for many people.

(This is probably alot of words for something easy, but I can't find a
tutorial which walks you through this Barney-style.)

Appreciate any guidance!

V/R

Lostguy
 
G

gls858

Hello!
Just getting started with Access. Have the basic fields set up for an
employee database, but I find I am entering some data several times:

There is one form field named "Paygrade" and then two others named
"Hourly Rate" and "Overtime Rate".

What I would like to do is restrict "Paygrade" to certain values (GS-1
Step 1, GS-1 Step 2, etc.). When those values are selected (by a
dropdown...?), the hourly rate and overtime rates automatically fill -
in.

Right now, I type in the paygrade for one employee and I am typing in
the hourly/OT rates which are the same numbers for many people.

(This is probably alot of words for something easy, but I can't find a
tutorial which walks you through this Barney-style.)

Appreciate any guidance!

V/R

Lostguy

What tables do you have? What fields do they contain?

gls858
 
K

KARL DEWEY

Right now, I type in the paygrade for one employee and I am typing in the
hourly/OT rates which are the same numbers for many people.
Your method may result in many mistakes as the hourly/OT rates are typed in.
Create a table containing the hourly/OT rates for each grade and step
combination. Then create a one-to-many relationship between the pay table
and the employee table on the grade-step field.
 
C

cpocpo

Hello and thanks for the help!

Here is what I did:

I set up a "Paygrade" table which has four columns: an autonumber
primary key, "Paygrade" "HourlyRate" and "OverTimeRate"

On my form, I have 3 fields:

"Paygrade" which uses a combo box, creating a dropdown menu for the
user to choose. The source of this is the "Paygrade Table" "Paygrade"
field. This part is working fine.

Now I have two other fields on the form "Hourly Rate" and "Overtime".

What I want is for the two empty fields to "see" what the user selects
from the Paygrade field and update themselves with the correct
information from the corresponding information form the Paygrade
Table.

??

(I tried creating the relationship Karl suggested but I don't think I
did that right.)

Thanks!

V/R

StillLostGuy
 
L

Larry Daugherty

Using a copy of your form:
Make sure that the data source for your form is the table with the pay
grades. Delete the existing combobox for Paygrade. With wizards
enabled, click the combobox icon on the toolbox and draw the combobox
back on the form. The wizard will ask what you want to do. You want
to go to the selected record.

Make sure that the data sources for the other fields are correct.

HTH
 

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