Hopefully someone can steer me in the right direction. I have a simple form that a user chooses a last name from and then other textboxes populate with that persons information such as first name, employee # etc.. I am using the following in the on change event of the last name field to populate the above stated fieds:
Everything is fine unless there are multiple people with the same last name, the "other" boxes are always populated with the first person in the list, I am assuming its because the dlookup is simply displaying the first one it finds. Can someone offer a better solution for me?
Thanks for any help!
Paul
Code:
Me.EmployeeFirstName.Requery
Me.EmployeeFirstName = DLookup("[firstname]", "qryinfotellerdiff")
Me.Region.Requery
Me.Region = DLookup("[corporate region]", "qryinfotellerdiff")
Me.BranchName.Requery
Me.BranchName = DLookup("[dept name]", "qryinfotellerdiff")
Me.Branch_.Requery
Me.Branch_ = DLookup("[dept number]", "qryinfotellerdiff")
Me.EmployeeNumber.Requery
Me.EmployeeNumber = DLookup("[Empl ID]", "qryinfotellerdiff")
Everything is fine unless there are multiple people with the same last name, the "other" boxes are always populated with the first person in the list, I am assuming its because the dlookup is simply displaying the first one it finds. Can someone offer a better solution for me?
Thanks for any help!
Paul