well i should tell you first that you should have a very gud know how with the following things asp,msaccess,html and javascript i would suggest youu to use html for your front end and asp at the back end for cummunitcating with the database use dreamweaver ver 8.+.....and as per your requirementyou are trying to make a drop down box okay .....means you have to use
[HTML]
<select >
<option1></option>
<option1></option>
</select>
[/HTML]
and then make as much select drop down lists as many items you have in the first select menu for example i can give you an idea
i have a db in access which has a table named Stock
which has the record of printers of these 3 main companies
"konica,hp,cannon" which are denoted by the field name of company lets say
TABLE:Stock
Field name----------Type-------------------------------------Example data
id_no (primary key,Autonumber) automatically assigned
macmodel (text) 2200,200,KM5410
company (text) HP,CANON,KONICA
NOW MAKE A FORM IN HTML AND MAKE A SELECTION MENU -
<select name="company">
-
<option value="none" selected="selected">Please Select a Company</option>
-
<option value="H">HP</option>
-
<option value="K">KONICA</option>
-
<option value="C">CANON</option>
-
</select>
-
now make the recordset object and connection string -
<%
-
set rs=Sever.CreateObject("ADODB.recordset")
-
connstr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("PATH TO YOU DATABSE")
-
%>
-
Now run a query to select all MachineModels for HP -
<%
-
STRsql="Select * FROM stock WHERE stock.company='HP';"
-
%>
-
now open the query and connection string with the recset object -
<%
-
rs.Open strSQL, connstr,3
-
%>
-
here you can display all the items for the hp models in a drop down list -
<select name="HP">
-
<%while not rs.EOF%>//////////////loop until the end of file
-
<option value="<%=rs.fields("macmodel")%>">response.write(rs.fields("macmodel"))</option>
-
<%rs.Movenext //////////////move to next item inthe database
-
loop
-
rs.close
-
%>
-
</select>
-
did you got any idea .........i am stopping here if you want continious guidence ........you have to work by your self too ..........now do a work make a form as i told you and a database containing the same fields name as i told you
make some entries manuallly by opening the database in access and enter 3 records for each of the companies having any kind of model names as you like and make a form and make all the four selection menus there as i told you
1...for the compnies
2....for the hp models (by looping through the database)
3....for canon models (same as above by looping)
4...for the konica (same as above)
then return to me with your code
"properly running"...then i will tell you how to hide them and how to trigger them open when they are required
Reagards,
Omer
Hi Omer,
I'm a complete newbie to the subject, so if u can suggest me how to do it from scratch. It would be great.
Thanks in advance