I've read through the forum and still haven't found what is going on with my code I received a Type Mismatch error...
Microsoft VBScript runtime (0x800A000D)
/ChartEdit.asp, line 72
The line causing the error is if FrequencyID <> NFrequencyID then
FreqQuery = "SELECT* FROM LKpFrequency where FrequencyID=" & FrequencyID
Call Selected.Open(FreqQuery, DBConn)
if Not Selected.eof then
FrequencyID = Selected("FrequencyID")
FrequencyDesc = Selected("FrequencyDesc")
Response.write("<label>FrequencyID: <select name=FrequencyID>")
Response.Write ("<option value=" & FrequencyID & ">" & FrequencyDesc &"</option>")
AllFreqQuery = "Select * From LKpFrequency"
Call NSelected.Open(AllFreqQuery, DBConn)
if Not NSelected.BOF then
Do While NOT NSelected.EOF
'Get the Frequency values from the database
NFrequencyID = NSelected("FrequencyID")
FrequencyDesc = NSelected("FrequencyDesc")
if FrequencyID <> NFrequencyID then
Response.Write ("<option value=" & NFrequencyID & ">" & "'FrequencyDesc'" &"</option>")
Last edited by notaprogrammer; 12-02-04 at 01:36.
Reason: dreaded typo
If I comment out the If Statement causing my type mismatch error and the end if naturally my code will run without error then only issue is that the item will display in the drop down list twice. Once because I populated the selected value and second because I'm pulling all the options from the look up table. Any suggestions on a better way to handle this?