Solved

Access generated ASP form with scroll list

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
original content 7 122
Need help fixing "Flash of Unstyled Content" problem with website 4 81
.CSS HTML Help 3 58
Presenting my portfolio on the web? 11 53
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
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.
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.

738 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