Solved

Access generated ASP form with scroll list

Posted on 1998-07-28
3
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

636 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