Hello i need to use ado to open a table and add data to it, within a form load event. i am having difficulties in the opening of the table.
The following code i have is
Dim cn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cn = CurrentProject.Connection
rst = cn.Open("table"
This is driving me crazy i have tried many different variations of this code but still get different types of error messages like:
expected function or variable!
All errors seem to be occuring in the final line of the shown code. Im sure its some stupid thing i have forgotten as ado is new to me.
Any advice would be greatly appreciated thanks
The following code i have is
Dim cn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cn = CurrentProject.Connection
rst = cn.Open("table"
This is driving me crazy i have tried many different variations of this code but still get different types of error messages like:
expected function or variable!
All errors seem to be occuring in the final line of the shown code. Im sure its some stupid thing i have forgotten as ado is new to me.
Any advice would be greatly appreciated thanks