showing value in form from other field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a form that I can select a value from a table and it inserts the
value into the master table. I need to be able to display a value in the form
based on the selection. The field that you can select to add to the students
record is a college. I need to then display the program director that is
tied to that college. There are many colleges and few program directors. I
added the program directors as a field in the college table, but I am not
sure how to make it display in the form when/after you have selected the
college. Help!!!
Thanks - Wayne
 
If you select the collage using a combo, and the row source of the combo
based on the college table, then add another field to the row source
Select Collage, directors From CollageTable

On the after update event of the combo, you can write the code
Me.directorsFieldName = Me.CollageComboName.column(1)

The column number start with 0

Or
In the control source of the directors field, you can write
=[CollageComboName].column(1)
=============================================
If its not through a combo, you can write in the control source of the
directors field
' If collage it a number field
=DLookUp("directors","CollageTableName","Collage =" & [CollageFieldName])

' If collage it a text field
=DLookUp("directors","CollageTableName","Collage ='" & [CollageFieldName] &
"'")
 
Thanks - that put me on the right track!
- Wayne

Ofer said:
If you select the collage using a combo, and the row source of the combo
based on the college table, then add another field to the row source
Select Collage, directors From CollageTable

On the after update event of the combo, you can write the code
Me.directorsFieldName = Me.CollageComboName.column(1)

The column number start with 0

Or
In the control source of the directors field, you can write
=[CollageComboName].column(1)
=============================================
If its not through a combo, you can write in the control source of the
directors field
' If collage it a number field
=DLookUp("directors","CollageTableName","Collage =" & [CollageFieldName])

' If collage it a text field
=DLookUp("directors","CollageTableName","Collage ='" & [CollageFieldName] &
"'")

--
I hope that helped
Good luck


Wayne said:
Hi,
I have a form that I can select a value from a table and it inserts the
value into the master table. I need to be able to display a value in the form
based on the selection. The field that you can select to add to the students
record is a college. I need to then display the program director that is
tied to that college. There are many colleges and few program directors. I
added the program directors as a field in the college table, but I am not
sure how to make it display in the form when/after you have selected the
college. Help!!!
Thanks - Wayne
 
Back
Top