Hello -
I have a scenario that I can probably make work with a chained app but wondering if it is possible to avoid that route and keep the logic all inside the same app. I have two name/value lists that are prepopulated from A LOOKUP table in the database: (1) a list of distinct state codes and (2) a list of distinct city names prefixed by a state code. So, for example the STATE Listbox would contains a name value pair of NJ/NJ and the CITY Listbox would contains a series of City name/value pairs prefixed with the State: e.g., NJ-Newark\NJ-Newark, NJ-Paterson\NJ-Paterson, NJ-Roseland\NJ-Roseland, etc. All the other State/City combinations would of course be in the City ListBox and as a result it is a VERY long list. I'd like to dynamically limit what is displayed in the CITY dropdown based the selection made in the STATE ListBox.
I thought that perhaps there was a way to pass the value from the STATE ListBox into the CITY ListBox query. Right now the CITY ListBox query looks something like: "xxxxx|||SELECT NAME, VALUE FROM LOOKUP_TABLE WHERE NVTYPE = 'CITY' ORDER BY NAME". That works fine but is it possible to include the STATE selection made by the User previously in that query so it looks something like: "xxxxx|||SELECT NAME, VALUE FROM LOOKUP_TABLE WHERE NVTYPE = 'CITY' AND VALUE LIKE (the state code selected by the user in the STATE dropdown) ORDER BY NAME".
It sounds reasonable and I think that it is possible to reference what was actually selected in a different ListBox but just don't know how.
Any help would be greatly appreciated.