Hi,
You can use DLookup to find a field given a criteria, criteria which can be
dependant of a variable:
DLookup( "address", "Companies", "CompanyNumber=" &
MyGlobalVariable )
To pick the whole record, try to use the recordset clone.
With Me.RecordsetClone
.FindFirst "CompanyNumber= " & myGlobalVar ' note the
starting dot
If Not .NoMatch then
Me.OtherControl = .Fields("CompanyName")
Me.SomeOtherControl = .Fields("ContactName")
End If
End With
Hoping it may help,
Vanderghast, Access MVP