By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,189 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,189 IT Pros & Developers. It's quick & easy.

2 Lookup controls on Form

P: 69
Hi there, am confused. Am wondering if you have a lookup control on the form and it populates the form with the selected Employee Name and all other pertinent data, is there a way to have 2 lookup fields (one for Employee Name, and one for Employee ID) and when you make a selection from the Employee Name lookup control have it populate the form and also the Employee ID control with the correct Employee ID? Am also wondering if you make a selection from the Employee ID lookup control and have it do the same for the form fields as well as the Employee Name.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo83_AfterUpdate()
  2.     ' Find the record that matches the control.
  3.     Dim rs As Object
  5.     Set rs = Me.Recordset.Clone
  6.     rs.FindFirst "[EMP_ID] = '" & Me![Combo83] & "'"
  7.     If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  8. End Sub

Expand|Select|Wrap|Line Numbers
  1. Row Source for  Employee Name

Expand|Select|Wrap|Line Numbers
  1. Row Source for Employee ID

Thank you VERY much for your assistance
Nov 21 '08 #1
Share this Question
Share on Google+
1 Reply

P: 25

you may want to use cascading combo to look up the data you need base on employee id or employee name... here you''ll have to use a combo box.

you can check the concept in the link below.

Cascading Combo/List Boxes - bytes

Nov 25 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.