![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I have taken over a progam from an ex collegue. When I convert a access'97 database to access 2000 or 2002 then I get on a update of a query the message "cannot update. Database or object is read-only" The application is running well under access'97. I have set all the rights to the user, I have import all the tables,query's etc + hidden tables from '97 to 2000 , I have convert the database from '97 to 2000 , but everytime I get the same message. Can this code be the fault written in access'97 : Option Compare Database Option Explicit Declare Function GetUserName Lib "Advapi32" _ Alias "GetUserNameA" (ByVal Buffer As String, _ BufferSize As Long) As Long Function GetUser() As String Dim UserName As String * 8 Dim Database As String * 20 Dim NameSize As Long Dim ErrNumber As Long NameSize = Len(UserName) ErrNumber = GetUserName(UserName, NameSize) GetUser = Left(UserName, NameSize) Dim CurrentDb As Database, Currentset As Recordset Set CurrentDb = DBEngine.Workspaces(0).Databases(0) Set Currentset = CurrentDb.OpenRecordset("tblCurrentUserLog") Currentset.AddNew Currentset![ActiveUser] = UserName Currentset![Database] = "Barcode UI" Currentset![Date] = Now Currentset.Update Currentset.Close End Function Appreciate any help you can give. Sincerely |
![]() |
| Thread Tools | |
| Display Modes | |
| |