How do i populate dropdown box on basis of the query written in
vb.
i am using access forms.
here is the code
thanks in advance.
Dim abc As String
Dim db As ADODB.connection
Set db = New ADODB.connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
'Make Connection with the Database.
connstr = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=CVTracker;Initial Catalog=CVTracker"
db.Open (connstr)
Sql = "Select * From ContactDetails where UserID =" & Form_frmMain.ID
Set rs = db.Execute(Sql)
While Not rs.EOF
-------Some Code Requried here s the code i am missing something in while loop.
how to achieve this.
-----
rs.MoveNext
Wend
Best Regards,
Vivek.