This topic is locked

Where expression in dropdown list help

5/23/2009 6:40:22 PM
ASPRunnerPro General questions
G
gsrai31 author

Hi there, I have a dropdown list based on a column called "SchFlights" from my lookup table called "Flights". The Flights table has a column called "UserID". In the display field I want show only the values where Session("UserID") = [Flights]![UserID]. What exactly I have to have as where expression? I have tried to follow the example but cant seem to get it right. Thanks in advance. gsrai31

J
Jane 5/25/2009

Hi,
here is a sample:> "[UserID]='" & Session("UserID") & "'"

G
gsrai31 author 5/25/2009

Jane, thanks for your help. When I test the dropdown list using your expression, I get "Unable to retrieve data using the where condition you've entered. All records are displayed" message. I copied and pasted "[UserID]='" & Session("UserID") & "'" exactly as you have written in your reply.
Also "allow to add new value on fly" option gets disabled as soon as I enter this expression. Does it matter what exactly I have in the Link Field selected for where clause to work? Do I need to have "This dropdown is dependent on..." selected? If yes what would be Category control and category field set to? All I am trying to do is display list of values from Flights table where logged in user is equal to flight.userID. The user should also be able to add new record to flights table if the value required is not in the dropdown list.
There is very little information on some of these functions. What does "lookup wizard as edit box with ajax popup" is for? Is there any detailed explanation or tutorial available on this? Is there a book I can buy that has complete reference to ASPrunner. I am currently evaluating ASPRunnerPro 5.2 before committing to buy and subscribe to online technical support. Thanks again for your help.

Sergey Kornilov admin 5/25/2009

Session variables are only populated in the run time, when you test ASP application. It won't work in design mode.
Detailed manual on Lookup wizard:

http://www.xlinesoft.com/asprunnerpro/docs...okup_wizard.htm

G
gsrai31 author 5/25/2009

Sergey,

Thanks for this. I will go through the link you have kindly provided.

Should "allow to add new value on fly" option work when where expression is used? Or this gets disabled due to some other issue?

Sergey Kornilov admin 5/25/2009

"Allow to add new value on fly" option should not be used with WHERE clause enabled.

G
gsrai31 author 5/25/2009

Thank you !!

G
gsrai31 author 5/25/2009

Hi again, I am still having problems with where expression. I uploaded my project to demo account to check if dropdown list is limited to the values where session userID matches with userID in the lookup table. But I get the following error -
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
Can you please help me with this. Thanks in advance !!

J
Jane 5/26/2009

answered in your personal email.