Solved

Access generated ASP form with scroll list

Posted on 1998-07-28
3
185 Views
Last Modified: 2013-12-25
I have an Access 97 db and recently added a new field
to the table, and a scroll list to the associated form.

The idea is, within the form a user can scroll in the
window, hilight the choice and it will be written back
to the field in the db record. Within Access, this all
works (ie I can move through old records and the scroll
list correctly displays the previous choices).

Then I did "Save-As" and exported the form to an ASP page.
Everything works, except that the scroll list is displayed
as if the value was never set (in other words the list
is always set to the first element).

However, I do know that the object

rs.fields("listbox").Value

is set correctly, it's just that the value is not
hilighted in the scroll list. So the question is,
how do I get the scroll list to hilight the n'th
element in the list?

I'm using IIS 4.0 by the way.
0
Comment
Question by:sglanger
  • 2
3 Comments
 

Author Comment

by:sglanger
ID: 1858721
Edited text of question
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 120 total points
ID: 1858722
You will need to edit the code...

When ASP inserts the "options" for you scrolling list, it uses the tag <OPTION> </OPTION> within the <SELECT></SELECT> tags.  What you need to do is add the SELECTED paramater to the OPTION tag when the value = the correct one... For instance,

value = Item Number 3
If option you are writing = value then send <OPTION SELECTED> to page... If not, send <OPTION> to page...

That is how you do it... If you would like some source code, send me the field values and the ASP page... I will fix it up for you if you wish... masseym@javanet.com

- Matt
0
 

Author Comment

by:sglanger
ID: 1858723
MasseyM has done yeoman's work on this question, but
at the expense of re-writing the entire ASP file that ACCESS
created into a more HTML based file where he could use
a FORM with SELECT. Therefore I'm giving hime the points,
but reopening the question.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HTML table 7 54
remove element from displaying on mobile devices 3 51
cookies analysis tools 2 26
Cordova Camera plugin fails 2 19
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now