P
Peter
Hi
I'm still learning access and am trying some of the native
coding. The snippet below is the code behind a command
button on a form. All the database, table and field names
are okay and have been checked against the source but
everytime I run it I'm getting a type 13 error. Does
anyone know what I'm doing wrong?
Thanks in advance for any help - this is really driving me
crazy as I've compared it to various statements within
Access Help and still can't see anything wrong.
Peter
PS SELECT line is continuous but has been split by the
posting system so it shouldn't have an underscore after
the FROM statement.
Sub Command0_Click()
Dim dbsmgrs As Database
Dim mgrs2 As Recordset
Set dbsmgrs = OpenDatabase("TestTest.mdb")
Set mgrs2 = dbsmgrs.OpenRecordset("SELECT ManagerName FROM
Managers", dbReadOnly)
recsfound = mgrss.RecordCount
MsgBox (recsfound)
I'm still learning access and am trying some of the native
coding. The snippet below is the code behind a command
button on a form. All the database, table and field names
are okay and have been checked against the source but
everytime I run it I'm getting a type 13 error. Does
anyone know what I'm doing wrong?
Thanks in advance for any help - this is really driving me
crazy as I've compared it to various statements within
Access Help and still can't see anything wrong.
Peter
PS SELECT line is continuous but has been split by the
posting system so it shouldn't have an underscore after
the FROM statement.
Sub Command0_Click()
Dim dbsmgrs As Database
Dim mgrs2 As Recordset
Set dbsmgrs = OpenDatabase("TestTest.mdb")
Set mgrs2 = dbsmgrs.OpenRecordset("SELECT ManagerName FROM
Managers", dbReadOnly)
recsfound = mgrss.RecordCount
MsgBox (recsfound)