Firstly, I'm new to VB and using ADO.

I have a database 'sample.mdb'. This database contain a table 'test1'.

Here is how I open the database:


/* Start code here

Private Sub Form_Load()
Dim cLocation As String, SQLstmt As String
Dim adodc1 As New ADODB.Connection
Dim rs1 As New ADODB.Recordset
cLocation = "c:\sample.mdb"
adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Jet OLEDBatabase Password=my_password_here;" & _
"Data Source=" & cLocation & ";" & _
"Persist Security Info=False"
adodc1.CommandTimeout = 15
adodc1.Open
Set rs1 = New ADODB.Recordset
Set rs1 = adodc1.Execute("Select * from test1 order by mykeyid", , adCmdText)
' adodc1.CommandType = adCmdTable
End Sub

*/ End Code here

It seem that the progrom startup okay but nothing appear on my form.

If I change the format to using 'data' icon form toolbox tag, the form shown whatever i want. Because my access database is password protected, I can't use the 'data' format - 'Invalid password' message appear.

Hope someone can provide me some idea here.

Thanks.