Hi,
I am new in access VBA (I have some experience in excel VBA).
What is wrong with the following code - does not shown/open mySQL in access as datasheet view/ query? :banghead: Also, does not report any error? What to do? Thanks in advance!
Public Sub Probna()
Dim mySQL As String
Dim cnnX As ADODB.Connection
Set cnnX = CurrentProject.Connection
Dim myRecordSet As New ADODB.Recordset
myRecordSet.ActiveConnection = cnnX
mySQL = "SELECT [Retail portfolio database prije].JMBG"
mySQL = mySQL + " FROM [Retail portfolio database prije];"
myRecordSet.Open mySQL
End Sub
I am new in access VBA (I have some experience in excel VBA).
What is wrong with the following code - does not shown/open mySQL in access as datasheet view/ query? :banghead: Also, does not report any error? What to do? Thanks in advance!
Public Sub Probna()
Dim mySQL As String
Dim cnnX As ADODB.Connection
Set cnnX = CurrentProject.Connection
Dim myRecordSet As New ADODB.Recordset
myRecordSet.ActiveConnection = cnnX
mySQL = "SELECT [Retail portfolio database prije].JMBG"
mySQL = mySQL + " FROM [Retail portfolio database prije];"
myRecordSet.Open mySQL
End Sub