hu t 3.Feb.06 09:49 AM a Web browser Domino Designer 6.0.2 CF2 Windows XP
I have the following code to get the document with a serial number the user has input, and then use the number to search for the database to get the document:
serial = Inputbox$("Please enter the person's serial number:")
Call session.SetEnvironmentVar( "SER", serial )
Query = |SELECT Form = "Record" & sernum = @Environment("SER")|
Set dc = db.search( Query, Nothing, 0)
However, even if I enter a valid serial number and I know there is a document existing in the database with field sernum = the number I entered, it still returns 0. When I used the debugger, it looks like it couldn't convert the @Environment ("SER") into the number, it shows in Query variable as "SELECT Form = ""Record"" & sernum = @Environment(""SER"")".
Anybody has idea as to how to search db using @Environment?