Here's the relevant area of the asp file
<!-- get the event information from the database if applicable -->
<%
eventID = request.form("eventid")
dim egenrex, ename, eband, ename, eband, edate, etime, elocation, eprice, etickets, eimage, epromotion, ediscount
egenrex = ""
ename = ""
eband = ""
edate = ""
etime = ""
elocation = ""
eprice = ""
etickets = ""
eimage = ""
epromotion = ""
ediscount = ""
' only query the database if not a new event being created
if eventID <> "new" then
'Create an ADO connection odject
Set adoConnection = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("NewDawn.mdb")
'Create an ADO recordset object
Set rsRecordSet = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM tblEvent WHERE EventID = " & eventID & ";"
'Open the recordset with the SQL query
rsRecordSet.Open strSQL, adoConnection
'Loop through the recordset
Do While not rsRecordSet.EOF
egenrex = rsRecordSet("Type")
ename = rsRecordSet("Name")
eband = rsRecordSet("ArtistName")
edate = rsRecordSet("Date")
etime = rsRecordSet("StartTime")
elocation = rsRecordSet("Venue")
eprice = rsRecordSet("TicketPrice")
etickets = rsRecordSet("maxTickets")
eimage = rsRecordSet("ImagePath")
epromotion = rsRecordSet("Promotion")
ediscount = rsRecordSet("Discount")
'Move to the next record in the recordset
rsRecordSet.MoveNext
Loop
'Reset server objects
rsRecordSet.Close
adoConnection.Close
Set rsRecordSet = Nothing
Set adoConnection = Nothing
end if
%>
<td bgcolor = "#ddddff" colspan = "6" valign = "top" width = "690">
<div id = "content">
<table>
<form name = "eventupdate" method = "post" action = "updevent.asp">
<!-- set the pageid value to eventupdate as that is where we want to redirect to -->
<input type = "hidden" name = "pageid" value = "eventupdate.asp"/>
<tr>
<td>
<p>Genre</p>
</td>
<td>
<select name = "egenre">
<%
'Create an ADO connection odject
Set adoConnection = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("NewDawn.mdb")
'Create an ADO recordset object
Set rsRecordSet = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM tblGenre;"
'Open the recordset with the SQL query
rsRecordSet.Open strSQL, adoConnection
'Loop through the recordset
Do While not rsRecordSet.EOF
'Write the HTML to display the current record in the recordset
response.write ("<option value = """ & rsRecordSet("GenreID") & """>" & rsRecordset("Description") & "</option>")
'Move to the next record in the recordset
rsRecordSet.MoveNext
Loop
'Reset server objects
rsRecordSet.Close
Set rsRecordSet = Nothing
Set adoConnection = Nothing
%>
</select>
<%
eventupdate.egenre.value = egenrex
%>
</td>
</tr>