If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Lookup needs to fill two fields
OK this may be easy but I am stumped.
I have a table "Employees" it has two columns: Employee and GroupTitle I have a second table that tracks points per job called "PointTrack" and I have used a lookup column to pull in the Employee Name. The lookup column shows a drop down with the employee and grouptitle fields because some employees are in more than one group and this allows them to choose the correct group. What I need is to have both the Employee and group title visible in the form based on the PointTrack table. Right now, I can have them choose in the dropdown seeing both fields, but only the employee name shows up once the choice is made. How can I have both fields show in the box once the choice has been made in the dropdown? |
#2
|
|||
|
|||
Lookup needs to fill two fields
Hi, solution 1: show a calculated field in the combobox, concatenating both fields solution 2: add a new text field and set as control source the calculation = forms![name form]![name combobox].Column(2) the number 2 has to be replaced with the actual column number you want to display, taking in account the cols start numbering from 0 grts NG "hntsignif" wrote: OK this may be easy but I am stumped. I have a table "Employees" it has two columns: Employee and GroupTitle I have a second table that tracks points per job called "PointTrack" and I have used a lookup column to pull in the Employee Name. The lookup column shows a drop down with the employee and grouptitle fields because some employees are in more than one group and this allows them to choose the correct group. What I need is to have both the Employee and group title visible in the form based on the PointTrack table. Right now, I can have them choose in the dropdown seeing both fields, but only the employee name shows up once the choice is made. How can I have both fields show in the box once the choice has been made in the dropdown? |
#3
|
|||
|
|||
Lookup needs to fill two fields
On Wed, 10 Feb 2010 09:05:01 -0800, hntsignif
wrote: OK this may be easy but I am stumped. I have a table "Employees" it has two columns: Employee and GroupTitle I have a second table that tracks points per job called "PointTrack" and I have used a lookup column to pull in the Employee Name. The lookup column shows a drop down with the employee and grouptitle fields because some employees are in more than one group and this allows them to choose the correct group. What I need is to have both the Employee and group title visible in the form based on the PointTrack table. Right now, I can have them choose in the dropdown seeing both fields, but only the employee name shows up once the choice is made. How can I have both fields show in the box once the choice has been made in the dropdown? The GroupTitle field (and the name, for that matter) should simply NOT EXIST in the second table - only the EmployeeID. (I hope you do have an EmployeeID primary key, rather than using employee names as if they were unique, since they aren't!) What you can do is put a textbox on the form with a control source =comboboxname.Column(n) where n is the *zero based* index of the field you want to display; e.g. if the combo box has fields for the EmployeeID, LastName, FirstName and GroupTitle you would use (3) to display the fourth column. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|