Thallium,
Is this what you are looking for:
 Code:
CheckForUser("tuser") ;samAccountName

Function CheckForUser($samAccountName)
	
  $objRootDSE = GetObject("LDAP://rootDSE")
  $defaultNamingContext = $objRootDSE.Get("defaultNamingContext")
  
	$strUserName = $samAccountName
	$objConnection = CreateObject("ADODB.Connection")
	$objConnection.Open ("Provider=ADsDSOObject;")

	$objCommand = CreateObject("ADODB.Command")
	$objCommand.ActiveConnection = $objConnection

	$objCommand.CommandText = "<LDAP://" + $defaultNamingContext + ">;(&(objectCategory=User)(samAccountName=" + $strUserName + "));samAccountName;subtree"
   
	$objRecordSet = $objCommand.Execute

	If $objRecordset.RecordCount = 0
		? "sAMAccountName: " + $strUserName + " does not exist."
	Else
		? $strUserName + " exists."
	EndIf

	$objConnection.Close

EndFunction
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)