Student Fernie, I see you updated your original post with some more information. In terms of code formatting, I was thinking more along the lines of:
arcpy.env.workspace = r"\\fs\GIS\admin\temp_connect_files\COF_temp.sde"
arcpy.env.overwriteOutput = True
print "workspace environment connected"
workspace = arcpy.env.workspace
mxd = arcpy.mapping.MapDocument(r"P:\Joey_Plessis\service_cards\pdf_map_automation_script\DEFAULT_bc_one_call.mxd")
df = arcpy.mapping.ListDataFrames(mxd,"*")[0]
layer = arcpy.mapping.ListLayers(mxd, raw_input("enter layer name"), df)[0]
field = raw_input("enter field name")
print layer
print field
where = field +" " + "In" + " " + "(SELECT" +" "+ field + " "+ "FROM" +" " + "layer" + " "+ "GROUP BY" +" " + field +" "+ "HAVING Count(*)>1 )"
print where
arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION" ,where)
With regard to your first issue, i.e., "get a cannot combine string and layer objects error," you have already written the answer. arcpy.mapping.ListLayers returns a list of ArcPy Mapping Layer objects. You can't concatenate an object to a string, just like you can't concatenate an integer or float to a string, the data types don't support doing so:
>>> "string" + object()
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'object' objects
>>>
>>> "string" + 1
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects
>>>
>>> "string" + 1.
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'float' objects
>>>
ArcPy Layer objects store their name in a property named "name", which you can concatenate to a string since the property returns a Unicode string.
>>> lyr
<map layer u'map layer'
>>>
>>>> lyr.name
u'map layer'
>>>
>>> "string " + lyr.name
u'string map layer'