I am using the below code to get a list of staff from a table. What I want to do is havet the first list Item Displayed and being Where adostaff("StaffID" = adoPrimaryRS("StaffNo".
basically how do you do
if adostaff("StaffID" = adoPrimaryRS("StaffNo" then
<option value="" Selected>name
else
<option value="">name
end if
----------------------
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select id,description,date,days,hours,mins,staffNo,Department,periodNo from Maintenance WHERE jobno=" & JobID & " ORDER by ID", db, adOpenStatic, adLockOptimistic
' Get the List of Staff and The Current Staff Member
Set adostaff = New Recordset
adostaff.Open "select fname,sname,staffID from staff ORDER by fname", db, adOpenStatic, adLockOptimistic
Do While Not adostaff.EOF
CmbStaff.AddItem (adostaff("fname" & " " & adostaff("sname")
adostaff.MoveNext
Loop
adostaff.Close
basically how do you do
if adostaff("StaffID" = adoPrimaryRS("StaffNo" then
<option value="" Selected>name
else
<option value="">name
end if
----------------------
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select id,description,date,days,hours,mins,staffNo,Department,periodNo from Maintenance WHERE jobno=" & JobID & " ORDER by ID", db, adOpenStatic, adLockOptimistic
' Get the List of Staff and The Current Staff Member
Set adostaff = New Recordset
adostaff.Open "select fname,sname,staffID from staff ORDER by fname", db, adOpenStatic, adLockOptimistic
Do While Not adostaff.EOF
CmbStaff.AddItem (adostaff("fname" & " " & adostaff("sname")
adostaff.MoveNext
Loop
adostaff.Close