Do you want the user to be able to type into Description or is it just for
display purposes? If the latter, make it a calculated control using the
DLookup function.
Example:
=DLookUp("[Description Field]", "[Table Name]", "[Code Field]=" & Code)
or if Code is a text field
=DLookUp("[Description Field]", "[Table Name]", "[Code Field]='" & Code &
"'")
If you want the user to be able to make entries in Description, then in the
AfterUpdate event of Code, fill in the Description. The Description control
would then be bound to the Description field in the table/query. If the user
changes the description, it will change it in the underlying table.
Example:
If Not IsNull(Me.Code) Then
Me.Description = DLookUp("[Description Field]", "[Table Name]", "[Code
Field]=" & Me.Code)
Else
Me.Description = Null
End If
The modification in the first example for Code being a text field applies
here as well.