Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Numbers doesn't seem to work

Status
Not open for further replies.

tempoman

Programmer
May 9, 2000
41
AU
Can someone suggest any solution to this problem I am facing.

I have two values that I would like to compare to see if they are the same. However when I use it in a "if" statement it does not equaluate to the same value, however printing it out on the screen displays it as being the same value. Below my code.

Note: The values are numeric values
------------------------------------
UserID = Request.Form("UserList")

AuthornameQry = "PublicationRelation.AuthorID" &_
"FROM PublicationRelation "

Set ast = Server.CreateObject("ADODB.Recordset")
ast.Open AuthorNameQry, strProvider

authorid = ast.Fields("AuthorID").Value

if "&authorid&" = "&UserID&" then
Response.Write " Same Author "
else
Response.Write " Different Author "
end if


Any suggestions will be grateful

Thanx

 
My VB is very poor... but you might try changing:

> if "&authorid&" = "&UserID&" then

to:

if authorid = UserID then


Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top