2

I have an Access 2013 database split across a network that is mainly used via Citrix. I keep getting the error message that the database is in an inconsistent state and I don't know why. I created a query to capture the user name and machine id as a auto-exec macro so I can go back and ask users what happened etc. But what I'd like to know is if it would be possible to know which user first encountered this error? Can I trap the error somehow and know which user "caused" it? I have a feeling that this error happens prior to the auto_exec macro firing but I live in hope.

What I am hoping to be able to do is get with the Citrix team and see if they have a corresponding error or something in their logs.

nathanjw
  • 832
  • 2
  • 13
  • 23
  • I don't believe that is an error which is "trappable" in VBA. Have you got the basics covered? No project references marked "MISSING", `Option Explicit` in all modules, and confirmed the code compiles without error. (I assume your answer is yes, but those are important points to confirm.) – HansUp May 17 '16 at 16:14
  • @HansUp correct. I went through all of those. I'm now in the habit of compiling after every change and prior to rollout of updates. – nathanjw May 17 '16 at 16:18
  • 1
    Do the users each get their own copies of the front end database or are they all sharing one networked file? – HansUp May 17 '16 at 16:20
  • Does [decompile](http://stackoverflow.com/questions/3266542/how-does-one-decompile-and-recompile-a-database-application) help? – HansUp May 17 '16 at 16:39
  • @HansUp sadly they are all sharing the same front end. It's only being used for read-only lookup purposes. I wanted each user to have their own copy but IT disagreed with me. I haven't tried decompiling as I'm a bit apprehensive about it. I'm not sure about trying something I don't fully comprehend. – nathanjw May 17 '16 at 16:57
  • This is a bit of sticky wicket, Nathan. I can dig what you're up against. But that creates a huge question mark in my mind. See [Microsoft Answers](http://answers.microsoft.com/en-us/office/forum/office_2007-access/microsoft-office-has-detected-that-this-database/3fb41c70-f7ba-41dd-a847-e62203071466) for example. But I'm unsure how much of an issue it is in your situation. As a limited test, could you give maybe 6 users their own front end copies and monitor whether they encounter the "inconsistent state" thing? – HansUp May 17 '16 at 17:22
  • I'm going to hazard a guess that disabling the shift key start up option renders the decompile method redundant? – nathanjw May 18 '16 at 13:24
  • No, those are entirely separate issues. But I'm not at all confident decompile would cure your problem. That's something I use when stuff happens which I can't explain/resolve otherwise. Gustav's approach seems more promising to me. And/or do the limited test I suggested. – HansUp May 18 '16 at 13:45

1 Answers1

3

.. sadly they are all sharing the same front end. It's only being used for read-only lookup purposes. I wanted each user to have their own copy but IT disagreed with me.

The only way it could work reliably, is if the accdb file itself is marked as Read-Only, and that would probably leave your application useless.

I've been through this with a client running a huge Citrix setup (40000+ employees) for an application with a priority. IT had for a reason a strict view on security, but though quite cooperative, they were of little help.

However, I got it solved by a VB script. It worked in the first attempt and so well, that I wrote up a description here:

Deploy and update a Microsoft Access application in a Citrix environment

The great thing is, that you probably won't need IT to do anything for you.

Community
  • 1
  • 1
Gustav
  • 53,498
  • 7
  • 29
  • 55
  • Thanks Gustav, I'll have a read through your script to try and understand what it does. Q: What is the color/ no color option for? Also, what would happen if I mark the database as Read Only? The shared form is literally for read only info; I've marked every form control as locked. I have a separate database frontend that the admin folks use for updating/adding data. – nathanjw May 18 '16 at 12:06
  • The _color_ option was for superusers. When specified, the application turned off all fancy colouring, indeed from Format Conditions, to speed up the interface. If you switch on RO (just try), nothing can written to the file. All temp data goes to temp files, and nothing to be written when closing. – Gustav May 18 '16 at 12:13