This topic is locked

Lookup wizard doesn't appear on edit page

8/8/2004 8:22:37 AM
ASPRunnerPro General questions
author

Hi,
I use this code a lot as a Lookup


Function BuildSelectControl(strName, strValue)
BuildSelectControl=""

Set rsTemp = server.CreateObject ("ADODB.Recordset")

strSQL =""

strSize = 1
if "MRID" = strName then strSize = 1 : strSQL = "SELECT [MRID], [Fname]&' '&[Lname] as MR FROM [tblMerchandisers] ORDER BY [Lname] " end if
if strSQL <> "" then


For some reason when I used it this time when I go to edit instead or getting a select box I am getting the MRID e.g. 3 instead of Peter Pan.
Any solutions?
Thanks,

Bandit

Sergey Kornilov admin 8/8/2004

Bandit,
make sure that Edit as type is set to Lookup wizard for this field in ASPRunner.

500149 8/8/2004

Admin,
I do have the Edit area set to Lookup wizard... I have redone this code several times thinking that maybe there was just a glitch somewhere when it was created but it always comes out the same... any other ideas as to what gives?

if strField="MRID" then GetEditFormat = "Lookup wizard" end if

Thanks,

Bandit

P
paho01 8/12/2004

Bandit,
Do you have this string (sql code) right
if "MRID" = strName then strSize = 1 : strSQL = "SELECT MRID, MRID FROM MRID ORDER BY 1 " end if
further down in the code?
I had the same problem but it was when I added a field and forgot to type in this string.
PAHO01