planetdrouin
Technical User
Hello,
I am trying to implement code from here to check FE version and to update it if necessary.
The two threads for the code are faq705-2010 and faq705-1971 .
My problem is arising when I try to set the recordsets. I get a run time error 3112, which is 'records cannot be read; no read permission "TblVersionNumber"'. However, I am the owner of the table, and the entire database.
To open my FE, I use the following shortcut:
"C:\Programs\Microsoft Office\Office10\MSACCESS.EXE" "C:\NDR Software\NDR_App.mdb" /WRKGRP "C:\NDR Software\NDRSecurity.mdw"
The intial code to check the version is as follows:
Function CheckVersion() As Boolean
Dim Thisdb As DAO.Database, ThisRs As DAO.Recordset
Dim db As DAO.Database, Rs As DAO.Recordset
Set db = OpenDatabase("\\Server\Work\NDR Software\NDR_App.mdb"
'Path to master front end file in shared folder
Set Thisdb = CurrentDb
Set ThisRs = Thisdb.OpenRecordset("tblVersionNumber"
Set Rs = db.OpenRecordset("tblVersionNumber"
CheckVersion = False
If Rs("Version" <> ThisRs("version" Then
fHandleFile GetDBLocation & "UpdateFrontEnd.vbs", WIN_NORMAL
CheckVersion = True
End If
Rs.Close
ThisRs.Close
Set Rs = Nothing
Set ThisRs = Nothing
If CheckVersion = True Then Application.Quit acQuitSaveNone
End Function
After my AutoExec halts, I am unable to change any of my VB as it says I don't have exclusive rights to the database. Anybody have any ideas on what I am doing wrong or is going on?
Thanks
Lawrence
I am trying to implement code from here to check FE version and to update it if necessary.
The two threads for the code are faq705-2010 and faq705-1971 .
My problem is arising when I try to set the recordsets. I get a run time error 3112, which is 'records cannot be read; no read permission "TblVersionNumber"'. However, I am the owner of the table, and the entire database.
To open my FE, I use the following shortcut:
"C:\Programs\Microsoft Office\Office10\MSACCESS.EXE" "C:\NDR Software\NDR_App.mdb" /WRKGRP "C:\NDR Software\NDRSecurity.mdw"
The intial code to check the version is as follows:
Function CheckVersion() As Boolean
Dim Thisdb As DAO.Database, ThisRs As DAO.Recordset
Dim db As DAO.Database, Rs As DAO.Recordset
Set db = OpenDatabase("\\Server\Work\NDR Software\NDR_App.mdb"
'Path to master front end file in shared folder
Set Thisdb = CurrentDb
Set ThisRs = Thisdb.OpenRecordset("tblVersionNumber"
Set Rs = db.OpenRecordset("tblVersionNumber"
CheckVersion = False
If Rs("Version" <> ThisRs("version" Then
fHandleFile GetDBLocation & "UpdateFrontEnd.vbs", WIN_NORMAL
CheckVersion = True
End If
Rs.Close
ThisRs.Close
Set Rs = Nothing
Set ThisRs = Nothing
If CheckVersion = True Then Application.Quit acQuitSaveNone
End Function
After my AutoExec halts, I am unable to change any of my VB as it says I don't have exclusive rights to the database. Anybody have any ideas on what I am doing wrong or is going on?
Thanks
Lawrence