I am building form that will serve as somewhat of a search freature for the end users. First they will be selecting the Managers name, they they will be presented with a drop down list of all of the agents that reported to the manager. The problem is that since this list is accumulating, you might have employee "x" name show up 30 or more times underneath the agent name drop down list.
Here is the VBA code that I used:
Private Sub SectionManagerName_AfterUpdate()
On Error Resume Next
AgentName.RowSource = "Select ConversionMasterTBL.AgentName " & _
"FROM ConversionMasterTBL " & _
"WHERE ConversionMasterTBL.SectionManagerName = '" & SectionManagerName.Value & "' " & _
"ORDER BY ConversionMasterTBL.AgentName;"
End Sub
Also Attached is a screen shot of the issue at hand. As you can see, it shows the agents name repeadtly, but I only want it to display the name once.
-------------------------
Another question that I have is if you look at image2 you will see that there is a field that says PeriodEndDate. I would like for this field to read off of what is selected from the AgentName field. Is this possible? If someone could show me how to write the script i would appreciate it. I think the tricky part will be trying to figure out the calculated sum ($) of the agents and have that figure displayed in the AmountPaid field, since there will be multiple records for the agents for any given period end date.
Thanks