|
Hi.
I have a site where I can see som records from a db whit 3 table's http://www.javacoder.dk:56400/joins/show.asp - http://www.javacoder.dk:56400/joins/show.asp
Now I will make a site where I can add some new records, but then I was thinking about something !!
It this posible !? To make a form where there is 2 onChange="MM_jumpMenu
1. That show all the records in Table A + Add New (Then if I select Add New there will come a textfield under or behind the jumpMenu where I then can write a new Location if I don't want to use some of the old's)
1. That show all the records in Table C + Add New (Then if I select Add New there will come a textfield under or behind the jumpMenu where I then can write a new Employee if I don't want to use some of the old's)
and then I can submit the new one's.
MY DATABASE db.mdb A location_code = [Auto and Key] location_name = [Text]
B id = [Auto and Key] location_code = [Number] employee_number = [Number]
C employee_number = [Auto and Key] employee_name = [Text]
If U want to know how I am coding if U want to give me an ex. then is this my code to the site SHOW.ASP
<html> </html> <head> </head> <body> <table width="260" border="0" cellpadding="0" cellspacing="0"> <% Dim cn Dim cnStr Dim sql Dim rs Dim strSQL Dim str
Dim strLName Dim strENumber Dim strEName
cnStr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath ("db.mdb") Set cn = Server.CreateObject("ADODB.Connection") cn.Open cnStr
strSQL = "SELECT DISTINCT B.employee_number,C.employee_name,A.location_name FROM B,C,A WHERE A.location_code = B.location_code AND B.employee_number=C.employee_number" Set rs = cn.Execute(strSQL)
if rs.EOF then Response.write "<font face=""Arial"" size=""2"">No Records</font>" else Do Until rs.EOF
strENumber = rs("employee_number") strEName = rs("employee_name") strLName = rs("location_name") response.write "<tr><td>" & strENumber & "</td><td>" & strEName & "</td><td>" & strLName & "</td></tr>"
rs.MoveNext Loop Response.Write "</table><br>"
End If cn.Close Set cn = Nothing %> </body> </html>
|