I have already tried pretty much every variation of the 'OpenDatabase'
method with no success. This problem relates to the different security
models between 16-bit and 32-bit Access. It is not a VB/DAO syntax issue.
I have a code that work from win98 to use access 2.0 database. Try
Dim mydb As Database, temp_data As Recordset, Data1 As Recordset
'Set mydb = Workspaces(0).OpenDatabase("D:\data1.mdb")
'Set temp_data = mydb.OpenRecordset("select tasktype from tasktypes
where STATUS ='ACTIVE' order by sequence ASC ") ' Open Recordset.
> There is no security on the database. I can open it in Access 2.0 without
> specifying a user name and password, and I can open it in Access 97 with
> Do you have security on the database? If not, then the workgroup file
> shouldn't really matter.
> I haven't tried going back to Access 2.0 from 32-bit clients, so I'm
> I can't offer any other suggestions.
> Doug Steele, Microsoft Access MVP
> Beer, Wine and Database Programming. What could be better?
> Visit "Doug Steele's Beer and Programming Emporium"
> > Hi,
> > When trying to open a recordset object in a 16-bit Access 2.0 database
> > a 32 bit VB application I get an error that says 'Record(s) can't be
> > no Read Data Permission on 'tblname'. I can open the table in Access 97
> > with no permission problems. My guess is that the problem relates to
> > pointing to the workgroup file.
> > Here is a stripped-down code-snippet of the code that I am using:
> > Dim wrkJet As Workspace
> > Dim dbsJet As Database
> > Dim rstTable As Recordset
> > Set wrkJet = DBEngine.Workspaces(0)
> > Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
> > Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"
> > Thank you in advance for any help that you may offer.
> > John