Hi there!
I wrote earlier. Your reply sounded great, but when I tried it, it said:
"User defined type not defined"
Do I need to declare something first?
This was the code in your suggestion:
Option Compare Database
Public dbs As database
Public rst As Recordset
Public Sql_Str As String
Public Function Test()
'Set dbs = CurrentDb
'Set rst = dbs.OpenRecordset("TableName")
'This is a very simple way to open a table. You can get specific by using a SQL String.
Set dbs = CurrentDb
Sql_Str = "Select * from t_Corp Actions"
Set rst = dbs.OpenRecordset(Sql_Str)
End Function
Thanks again, for your help! Andrea
I wrote earlier. Your reply sounded great, but when I tried it, it said:
"User defined type not defined"
Do I need to declare something first?
This was the code in your suggestion:
Option Compare Database
Public dbs As database
Public rst As Recordset
Public Sql_Str As String
Public Function Test()
'Set dbs = CurrentDb
'Set rst = dbs.OpenRecordset("TableName")
'This is a very simple way to open a table. You can get specific by using a SQL String.
Set dbs = CurrentDb
Sql_Str = "Select * from t_Corp Actions"
Set rst = dbs.OpenRecordset(Sql_Str)
End Function
Thanks again, for your help! Andrea