You can just use a standard lookup edit control.
Set the LookupID property to the field you want to populate (like AccountManagerID)
The lookup main table will be userinfo
select a lookup from the list - probably username
now you want to use the LookupRestrict fields
LookupRestrictAlways = checked
LookupRestrictField = {name of userinfo field you are filtering on like department / division / etc}
LookupRestrictOp = {as in you type the = sign for the input}
LookupRestrictValue = {your literal value, like Sales}
I believe that you do not need the quote marks around the value, but try it and see.
Be careful on department though - it is a multi select picklist - i.e. verify your data is going to work for this
ws |