C
chrisstrachan_at_msn.com
Hi,
I am having a hard time working out the VBA to show the results of my
query in Access.
I have used the following piece of code to execute the query that
seems to work but I don't know how to show the results.
Thanks in advance.
Chris
Private Sub Command3_Click()
Dim cnn As ADODB.Connection
Dim cnnR As New ADODB.Recordset
Dim strConnect As String
Dim SQLStmt As String
Dim obj As Recordset
Set cnn = New ADODB.Connection
strConnect = "DSN=yo;"
SQLStmt = "select * from test"
With cnn
.ConnectionString = strConnect
.Open
.Execute SQLStmt
End With
Set cnn = Nothing
End Sub
I am having a hard time working out the VBA to show the results of my
query in Access.
I have used the following piece of code to execute the query that
seems to work but I don't know how to show the results.
Thanks in advance.
Chris
Private Sub Command3_Click()
Dim cnn As ADODB.Connection
Dim cnnR As New ADODB.Recordset
Dim strConnect As String
Dim SQLStmt As String
Dim obj As Recordset
Set cnn = New ADODB.Connection
strConnect = "DSN=yo;"
SQLStmt = "select * from test"
With cnn
.ConnectionString = strConnect
.Open
.Execute SQLStmt
End With
Set cnn = Nothing
End Sub