Knotty problem ?

D

Doris Edwards

Hello,
Wonder whether you could help with this. I have .asp pages in FrontPage
linked to an Access database.

In the form reflecting the database contents, I have a field called Course
Code, for example the value 100. I define a hyperlink on this field towards
a Subscription Form that contains a "submit form", i.e. creates a new record
in the database.

The idea is that when the user clicks on Course Code of the original form,
he is redirected to the Inscription Form which automatically displays - in
the Course Code field - the course code, in this example : 100.

This to avoid that the user will have to retype the Course Code in the
Inscription Form.

Can this be done without complex programming ?

Thanks a lot for your help. Doris, Geneva, Switzerland
 
K

Kevin Spencer

Hi Doris,

Can you define "complex programming?" To me, it would not be complex at all,
but it certainly couldn't be done using the FrontPage Database Results tools
straight out of the box. It would require some custom ASP programming.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
J

Jim Buyens

-----Original Message-----
Hello,
Howdy.

Wonder whether you could help with this. I have .asp
pages in FrontPage linked to an Access database.

In the form reflecting the database contents, I have a
field called Course Code, for example the value 100. I
define a hyperlink on this field towards a Subscription
Form that contains a "submit form", i.e. creates a new
record in the database.

The idea is that when the user clicks on Course Code of
the original form, he is redirected to the Inscription
Form which automatically displays - in the Course Code
field - the course code, in this example : 100.

This to avoid that the user will have to retype the
Course Code in the Inscription Form.

Can this be done without complex programming ?

Thanks a lot for your help. Doris, Geneva, Switzerland

Define "complex".

In your DRW page, you would have to use a custom query
that returns the HTML for a hyperlink rather than the
plain course number. For example, it might return:
<a href="enroll.asp&course=100">100</a>
rather than
100

The code in the custom query would look something like
this:

SELECT '<a href="enroll.asp?course=' & [coursenum]
& '">' & [coursenum] & '</a>' AS courselink,
...

Then, in the finished Database Results Region, you would
have to right-click the courselink column, choose Databae
Column Value Properties, and select the Column Value
Contains HTML box.

Finally, in your enrollment page, you would add some code
like this to the <head> section:

<%
Dim curCourseNum
if request("txtCourseNum") = "" then
curCourseNum = request("course")
else
curCourseNum = request("txtCourseNum")
end if
%>

and code the txtCourseNum text box like this

<input type="text" value="<%=curCourseNum%>">

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
D

Doris Edwards

Thanks very much for coming back to me, Kevin and Jim.
Having spent a sleepless night re-reading FrontPage help, I finally came up
with something along the lines of Jim's inputs.

In defining the hyperlink (in the original form) with a parameter, one can
configure a certain field to be identified as key for a customer query in
the destination form. This did the trick.

I am quite technical but I have not had time to start with html, scripting
etc. in the Internet world. One just can't know everything.

Best regards from Geneva. Doris
 
K

Kevin Spencer

Hi Doris,

For future reference, you can find some introductory articles and
interactive tutorials on ASP and ADO on my web site:
http://www.takempis.com.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top