Solved

Access generated ASP form with scroll list

Posted on 1998-07-28
3
196 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

911 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

16 Experts available now in Live!

Get 1:1 Help Now