I
Ivano Venturi
In the MS Access 2003 User Guide is reported the following example about
AddNew method:
Dim dbsNorthwind As Database
Dim rstEmployees As Recordset
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set rstEmployees = dbsNorthwind.OpenRecordset("Employees", dbOpenDynaset)
As my database name is RegSIP_app.mdb, RegSIP_dat.mdb is the one where are
stored all the data tables and Tab_PreAmb is the name of the table in which I
have to add a new record when user clicks a button on a form stored in
RegSIP_app.mdb, I tried to write something like this:
Dim dbsRegSIP As Database
Dim rstPreAmb As Recordset
Set dbsRegSIP = OpenDatabase("g:\RegSIP\RegSIP_dat.mdb")
Set rstPreAmb = dbsRegSIP.OpenRecordset("Tab_PreAmb", dbOpenDynaset)
I have MS Access 2003 SP3 and it does not work at all ! :-S I mean ... it
gives me a compilation error saying that the user defined type is not defined
!?! Can someone help me to find where is my mistake ?!? Thank you very much
in advance !
Greetings from Modena,
Emilia-Romagna - Italy.
AddNew method:
Dim dbsNorthwind As Database
Dim rstEmployees As Recordset
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set rstEmployees = dbsNorthwind.OpenRecordset("Employees", dbOpenDynaset)
As my database name is RegSIP_app.mdb, RegSIP_dat.mdb is the one where are
stored all the data tables and Tab_PreAmb is the name of the table in which I
have to add a new record when user clicks a button on a form stored in
RegSIP_app.mdb, I tried to write something like this:
Dim dbsRegSIP As Database
Dim rstPreAmb As Recordset
Set dbsRegSIP = OpenDatabase("g:\RegSIP\RegSIP_dat.mdb")
Set rstPreAmb = dbsRegSIP.OpenRecordset("Tab_PreAmb", dbOpenDynaset)
I have MS Access 2003 SP3 and it does not work at all ! :-S I mean ... it
gives me a compilation error saying that the user defined type is not defined
!?! Can someone help me to find where is my mistake ?!? Thank you very much
in advance !
Greetings from Modena,
Emilia-Romagna - Italy.