Updating One Field Based On Another

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

I'm looking for a little help here. I've got one table and a form that
automatically enters information into the table as I enter info on the form.
There is one section of the form where a ranking system is assigned to a
University such as:

Univ. A = .5
Univ. B = 1
Univ. C = .5
Univ. D = .75
Etc.

The university and rankings are pulled from a seperate table. There are two
fields present on the form. One for the University and one for the ranking. I
want the ranking field to update automatically based on what I enter in the
University field and then enter that information into the table. Can someone
help me out with this? Thanks!
 
In the AfterUpdate event of the University control, fetch the rank and
assign it to the ranking control:

Me.ranking = DLookUp("[ranking]","[separate table]","[University] = '" &
Me.University & "'")

This action will serve to both assign the value to the field and display it
on the form. Be sure to use your own table, field and control names.


Carl Rapson
 
Thanks a lot!

Carl Rapson said:
In the AfterUpdate event of the University control, fetch the rank and
assign it to the ranking control:

Me.ranking = DLookUp("[ranking]","[separate table]","[University] = '" &
Me.University & "'")

This action will serve to both assign the value to the field and display it
on the form. Be sure to use your own table, field and control names.


Carl Rapson

Nick said:
I'm looking for a little help here. I've got one table and a form that
automatically enters information into the table as I enter info on the
form.
There is one section of the form where a ranking system is assigned to a
University such as:

Univ. A = .5
Univ. B = 1
Univ. C = .5
Univ. D = .75
Etc.

The university and rankings are pulled from a seperate table. There are
two
fields present on the form. One for the University and one for the
ranking. I
want the ranking field to update automatically based on what I enter in
the
University field and then enter that information into the table. Can
someone
help me out with this? Thanks!
 
Back
Top