Questions relative to invokelookup

Hello, 

I am trying to write a script for lookup button in order to pull the salesperson data. I only want to pull the salesperson data whose division number is “00”. How can I pass ARDivisionNo as parameter? Here is the script which I am working on.

retVal = 0

oSalespersonNo = 0

oSalespersonName = 0

LookupCode = "AR_SalespersonDiv"

SalespersonNo = ""

retLookup = oUIObj.InvokeLookup(LookupCode, SalespersonNo,”00”)

 ( or)

sDiv = "00"

ssalespersonNo = ""

LookupCode = "AR_SalespersonDiv"

If lookupCode <> "" Then

 retVal = oUIObj.InvokeLookup(LookupCode, sDiv + ssalespersonno + String(20 - Len(ssalespersonNo),chr(0))

End If

Is this the correct way of passing the parameter? When I execute these scripts it doesn’t show me any errors and when I try to lookup it pops up with the table but there is no Salesperson data in it.