Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access generated ASP form with scroll list

Posted on 1998-07-28
3
Medium Priority
?
242 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 360 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

876 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