tirion_angel
08-14-2006, 09:51 AM
Hello!
I'm having problems populating my drop down list.
Here is my code:
FUNCTION Get_Version
Dim ls_sql, ls_version
Dim ls_result
ls_result = " "
ls_sql = "SELECT DISTINCT version "
ls_sql = ls_sql & "FROM issues "
ls_sql = ls_sql & "WHERE project_id = 10 "
ls_sql = ls_sql & "AND status_id = 5 "
ls_sql = ls_sql & "ORDER BY version "
Set gobjRecordset = gobjConnection.Execute(ls_sql)
Do Until gobjRecordset.EOF
ls_version = gobjRecordset.Fields("version")
ls_result = ls_result & "<option value=" & ls_version & ">" & ls_version & "</option>" & VBCRLF
gobjRecordset.MoveNext
Loop
Get_Version = TRIM(ls_result)
END FUNCTION
The problem is, some of the fields come back blank, and I need to remove those from the options in the drop down list. So far, I haven't been able to get it to work. Any ideas?
I'm having problems populating my drop down list.
Here is my code:
FUNCTION Get_Version
Dim ls_sql, ls_version
Dim ls_result
ls_result = " "
ls_sql = "SELECT DISTINCT version "
ls_sql = ls_sql & "FROM issues "
ls_sql = ls_sql & "WHERE project_id = 10 "
ls_sql = ls_sql & "AND status_id = 5 "
ls_sql = ls_sql & "ORDER BY version "
Set gobjRecordset = gobjConnection.Execute(ls_sql)
Do Until gobjRecordset.EOF
ls_version = gobjRecordset.Fields("version")
ls_result = ls_result & "<option value=" & ls_version & ">" & ls_version & "</option>" & VBCRLF
gobjRecordset.MoveNext
Loop
Get_Version = TRIM(ls_result)
END FUNCTION
The problem is, some of the fields come back blank, and I need to remove those from the options in the drop down list. So far, I haven't been able to get it to work. Any ideas?