![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Guys, I have a database that logs calls made by advisors in the Call Centre where I work. I have two tables: tbl_Calls tbl_Advisors The tbl_Calls is where the details of the calls get stored, and has the following fields, amongst others: AccountName Advisor AdvisorManager Comments TimeOfCall The tbl_Advisors table has the following fields (and is a linked table from another database) AdvisorName TeamManager I have created a form based on the tbl_Calls table where the call data can be entered, and entering the data is fine, except for one snag.... I have a combo box on the form that links to the tbl_Advisors table, and allows the user to select an advisor name without having to type it in. I also have a textbox on the form that should contain the manager's name, which again needs to be pulled in from the tbl_Advisors table. What I would like to happen, is when the user selects the Advisors' name from the combo box, it will autopopulate the AdvisorManager field with that advisor's Team Manager's name, then the user can carry on filling in the rest of the form without having to enter the manager's name. No matter what I try, it just will not populate the Manager field! Can anyone please help me with this, as I have just wasted an entire day getting it working. I know its something to do with the fact it's coming from a different table to what the form is based on, but for the life of me I can't work out how to resolve this. Much appreciated in advance, Mario Sarno |
#3
| |||
| |||
|
|
Your combo box can deal with this, but it does require a line of code. Set the combo box to have both fields. You can do this in the create wizard. Make the manager field second. In the column width property set the second width to 0". So only the first field will be seen. In the events tab of the combo box goto on change andclick on the ... and choose "code". Assume the combo box is named X. you need one line of code: me.manager = x.column(1).value (or whatever the manager field is called). you may need me.repaint, but I doubt it. Good Luck Ira Solomon |
![]() |
| Thread Tools | |
| Display Modes | |
| |