hi all,

im not too good with the vbscript. i am trying to populate a combo box using a sql query. here is the code that i have

VB Code:
  1. dim cDB
  2. dim oRec
  3.  
  4.  
  5.  
  6. set cDB = Session.AppDatabase
  7. Set oRec = cDB.OpenRecordset("Select distinct dbo.vluCustomerAddrBilling.AddrName, dbo.tPA00175.chrJobName FROM dbo.vluCustomerAddrBilling INNER JOIN dbo.tPA00175 ON dbo.vluCustomerAddrBilling.CustKey = dbo.tPA00175.CustKey WHERE (dbo.tPA00175.chrJobName = '"&Form.Controls("txtProjectName")&"')",1,0)
  8.  
  9. Do Until oRec.EOF
  10.      combobox1.AddItem oRec("AddrName")
  11.      oRec.MoveNext
  12.      Loop
  13.      oRec.Close

i am getting the error message with the oRec.EOF. this is the way to do it in vb6 but what is the syntax for vb script.

thanks alot
tibor