Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / November 2004

Tip: Looking for answers? Try searching our database.

"Operation invalid without a current index"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HG - 04 Nov 2004 14:23 GMT
I have an Access 97 DB that is split into front end (on several PCs in the
LAN) and back end (on the server). I need to add new fields to an existing
table. When I open the back end DB the buttons that should say Open, Design
and New are all blank. When I click the Tables tab I get the message
“Operation invalid without a current index”. When I go to File, Database
Properties I get the message “Microsoft Access is unable to load the database
properties”. I have checked LDB Viewer and have verified that no one else is
using the database and the Suspect column shows “No” for all users that have
logged off.

What is the problem, and how can I fix it?
Mike - 10 Nov 2004 19:56 GMT
Here is a utility we built.  This tool will create a new db will all
objects with the exception of relationships.  Create a new dB and add
the code below to a new form. Create two objects"

  text box called "txtOld"
  command button called "cmdRecover"

Enter the corrupted DB path and file name in the text box

Add the code below to the click event of the button

***********************************
Private Sub cmdRecover_Click()

Dim rst1 As Recordset
Dim intSpecIdMax As Integer

   If Nz(Me.txtOld, "") = "" Then
       MsgBox "You must enter file name."
       Exit Sub
   End If
   
   If Len(Dir(Me.txtOld)) <= 0 Then
       MsgBox "The file name you entered could not be found!  Please
check the file name and try again."
       Exit Sub
   End If

   If Right(CurrentDb.Name, 20) = "RecoveryDatabase.mdb" Then
       MsgBox "Please copy this database and rename to desired
completed file name.", vbOKOnly, "Database Recovery Tool"
       Exit Sub
   End If

   DoCmd.TransferDatabase acImport, "Microsoft Access", Me.txtOld,
acTable, "MSysObjects", "CorruptedObjects", False
   DoCmd.TransferDatabase acImport, "Microsoft Access", Me.txtOld,
acTable, "MSysIMEXSpecs", "MSysIMEXSpecs", False
   DoCmd.TransferDatabase acImport, "Microsoft Access", Me.txtOld,
acTable, "MSysIMEXColumns", "MSysIMEXColumns", False
   
   'Import Queries
   Set rst1 = CurrentDb.OpenRecordset("SELECT Type, Name FROM
CorruptedObjects WHERE Type = 5;")
   Do Until rst1.EOF
       DoCmd.TransferDatabase acImport, "Microsoft Access",
Me.txtOld, acQuery, rst1!Name, rst1!Name, False
       rst1.MoveNext
   Loop
   
   'Import Tables
   Set rst1 = CurrentDb.OpenRecordset("SELECT Type, Name FROM
CorruptedObjects WHERE Type = 1 AND Flags = 0;")
   Do Until rst1.EOF
       DoCmd.TransferDatabase acImport, "Microsoft Access",
Me.txtOld, acTable, rst1!Name, rst1!Name, False
       rst1.MoveNext
   Loop
   
   'Import Forms
   Set rst1 = CurrentDb.OpenRecordset("SELECT Type, Name FROM
CorruptedObjects WHERE Type = -32768 AND Flags = 0;")
   Do Until rst1.EOF
       DoCmd.TransferDatabase acImport, "Microsoft Access",
Me.txtOld, acForm, rst1!Name, rst1!Name, False
       rst1.MoveNext
   Loop
   
   'Import Reports
   Set rst1 = CurrentDb.OpenRecordset("SELECT Type, Name FROM
CorruptedObjects WHERE Type = -32764 AND Flags = 0;")
   Do Until rst1.EOF
       DoCmd.TransferDatabase acImport, "Microsoft Access",
Me.txtOld, acReport, rst1!Name, rst1!Name, False
       rst1.MoveNext
   Loop
   
   'Import Modules
   Set rst1 = CurrentDb.OpenRecordset("SELECT Type, Name FROM
CorruptedObjects WHERE Type = -32761 AND Flags = 0;")
   Do Until rst1.EOF
       DoCmd.TransferDatabase acImport, "Microsoft Access",
Me.txtOld, acModule, rst1!Name, rst1!Name, False
       rst1.MoveNext
   Loop
   
   
   'Import Macros
   Set rst1 = CurrentDb.OpenRecordset("SELECT Type, Name FROM
CorruptedObjects WHERE Type = -32766 AND Flags = 0;")
   Do Until rst1.EOF
       DoCmd.TransferDatabase acImport, "Microsoft Access",
Me.txtOld, acMacro, rst1!Name, rst1!Name, False
       rst1.MoveNext
   Loop
   
   DoCmd.DeleteObject acTable, "CorruptedObjects"
   
   MsgBox "The database has been recovered.", vbOKOnly
   
End Sub
***********************************

Written in MS Access '97 SR2 on OS Win XP Pro
Hope this helps.

> I have an Access 97 DB that is split into front end (on several PCs in the
> LAN) and back end (on the server). I need to add new fields to an existing
[quoted text clipped - 7 lines]
>
> What is the problem, and how can I fix it?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.