I am retiriveing some names from on database by some conditions....that names are being displayed in the listbox..........my question is if i select a name that person details should be displayed in the same form..........that person's name and other details are stored in same table..........
Plz help with code.........
My code is as follows......... -
<%@ Language = VBScript%>
-
<% Response.Buffer = True
-
-
%>
-
-
<html>
-
<head>
-
<title>PERSONAL DETAILS</title>
-
</head>
-
<body>
-
-
<%
-
Dim da
-
da = date()
-
Dim rs
-
Set rs = Server.CreateObject ("ADODB.Recordset")
-
rs.Open "details", "DSN=Personal"
-
-
Dim yy
-
Dim mm
-
-
dim age, caste, rscaste, ageto, gender
-
age = Request.Form ("D1") '( Taken from another form in another asp file)
-
caste = Request.Form ("D2")
-
ageto = Request.Form ("D3")
-
gender = Request.Form ("R1")
-
a = cint (age)
-
b = cint (ageto) %>
-
-
<form method="POST" action="--WEBBOT-SELF--">
-
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p>
-
Name : <select size="1" name="D1" size = "20">
-
<% While Not rs.EOF
-
-
' FINDING AGE
-
-
mm = DateDiff("m", rs("DOB"), da)
-
if mm >= 12 then
-
yy = cint(mm/12)
-
end if
-
-
' Selecting records by age
-
for i = age to ageto
-
rscaste = rs("Caste")
-
if yy = i then
-
' Selecting records by caste
-
if caste = rscaste then
-
' Selecting records by Gender
-
if not rs("Gender") = gender then
-
-
%>
-
-
<option value = "<%=rs("Name")%>"><%=rs("Name")%></option>
-
<%
-
end if
-
end if
-
end if
-
next
-
-
rs.MoveNext
-
Wend %></select></form>
-
-
-
-
-
<%
-
-
rs.Close
-
Set rs = Nothing
-
%>
-
-
</body>
-
</html>
2 2491
I am retiriveing some names from on database by some conditions....that names are being displayed in the listbox..........my question is if i select a name that person details should be displayed in the same form..........that person's name and other details are stored in same table..........
Plz help with code.........
My code is as follows......... -
<%@ Language = VBScript%>
-
<% Response.Buffer = True
-
-
%>
-
-
<html>
-
<head>
-
<title>PERSONAL DETAILS</title>
-
</head>
-
<body>
-
-
<%
-
Dim da
-
da = date()
-
Dim rs
-
Set rs = Server.CreateObject ("ADODB.Recordset")
-
rs.Open "details", "DSN=Personal"
-
-
Dim yy
-
Dim mm
-
-
dim age, caste, rscaste, ageto, gender
-
age = Request.Form ("D1") '( Taken from another form in another asp file)
-
caste = Request.Form ("D2")
-
ageto = Request.Form ("D3")
-
gender = Request.Form ("R1")
-
a = cint (age)
-
b = cint (ageto) %>
-
-
<form method="POST" action="--WEBBOT-SELF--">
-
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p>
-
Name : <select size="1" name="D1" size = "20">
-
<% While Not rs.EOF
-
-
' FINDING AGE
-
-
mm = DateDiff("m", rs("DOB"), da)
-
if mm >= 12 then
-
yy = cint(mm/12)
-
end if
-
-
' Selecting records by age
-
for i = age to ageto
-
rscaste = rs("Caste")
-
if yy = i then
-
' Selecting records by caste
-
if caste = rscaste then
-
' Selecting records by Gender
-
if not rs("Gender") = gender then
-
-
%>
-
-
<option value = "<%=rs("Name")%>"><%=rs("Name")%></option>
-
<%
-
end if
-
end if
-
end if
-
next
-
-
rs.MoveNext
-
Wend %></select></form>
-
-
-
-
-
<%
-
-
rs.Close
-
Set rs = Nothing
-
%>
-
-
</body>
-
</html>
if using ASP, you are going to have to submit the form, pull up the data, and redisplay the form.
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics
by: ChrisR |
last post by:
Hi guys
My app is a simple Main form with a few Subforms that are not linked,
and a few pop forms.
Problem is:
I have a pop form with a Listbox with a list of records related to the...
|
by: Geir Baardsen |
last post by:
Hi!
On frmItems I have a two listboxes. The first, lstAllCategories, is
loaded with data from tblCategory when frmItems open. When user click
lstAllCategories, the lstSelectedItems will show all...
|
by: Alpha |
last post by:
Hi,
I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a
listbox that I have binded to a dataset table, "source" which has 3 columns.
I would like to display 2 of those...
|
by: Kaur |
last post by:
Hi,
I am having problem trying to go to same record when I close 3rd form.
I have a form called frmDepartment. This form has a list box that
displays all the departments. Clicking on one of the...
|
by: rsbutterfly16 via AccessMonster.com |
last post by:
hi guys i have form with a listbox . The listbox is coming from a query that
gets all passengers(column 1 in listbox) and destinations(column 3) . so you
have repeting rows of passengers since...
|
by: MarkoBBC |
last post by:
Hi everyone,
First a brief description of my form: I have a subform within a main form. In my subform, I have a listbox displaying address information by firm name. A user first has to select a...
|
by: brewer95 |
last post by:
I use a form to enter data into a table. The user then has the opportunity to recall the data in the form based on a search to review and update the info. For example, on my menu there is a combo...
|
by: remya1000 |
last post by:
i'm using VB.NET.
i have a table names "EMP". this table contain employee details like Index, empID, First name, Last name, address, phone number etc.
while page loads, i need to display Last...
|
by: postman |
last post by:
I have a subform which is bound to a query which will display records using an ID# supplied from a listbox in the parent form.
That same subform is also used to create new records using the...
|
by: angelicdevil |
last post by:
i have listbox 1 which displays status , based on selection of status listbox 2 displays usernames. and based on username selected the textbox displays the email id.
its working fine till...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |