Get rid of 'on error resume next', so that you can see what is
going on. Where necessary, use an If statement to avoid errors:
(air code)
> For Each cb In CommandBars
if cb.name <> "Menu Bar" then cb.Visible = False
> Next cb
> CommandBars("Menu Bar").Enabled = False 'Can't be made invisible, so
> I'm getting a lockup state when running a process in my database once
> updated.
[quoted text clipped - 23 lines]
>
> --------------------------------------------------------------------------
-------------------
> Sub KillCommandBars()
> Dim cb As CommandBar 'Requires MS Office 8.0 Object Library (Tools,
[quoted text clipped - 11 lines]
>
> --------------------------------------------------------------------------
----------------------------
> Sub SeeCommandBars()
>
> Application.SetOption "Built-In Toolbars Available", True
> CommandBars("Menu Bar").Enabled = True
> End Sub
Jamie - 22 Nov 2006 19:22 GMT
It is for sure something in this code:
> Sub KillCommandBars()
> Dim cb As CommandBar 'Requires MS Office 8.0 Object Library (Tools,
[quoted text clipped - 9 lines]
>
> End Sub
If I rem out the call for KillCommandBars I do not have a problem. I did do
what you suggested but would get code errors.
Any other suggestions to why the above code causes a lockup and Access to
close and restart?
> Get rid of 'on error resume next', so that you can see what is
> going on. Where necessary, use an If statement to avoid errors:
[quoted text clipped - 56 lines]
>> CommandBars("Menu Bar").Enabled = True
>> End Sub
Jamie - 22 Nov 2006 19:28 GMT
Sorry I am wrong.
It isn't something in KillCommandBars as it is still happening. Could be a
combination but it is still locking up?
See for some reason sometimes on the first open it will work and allow me in
without locking up. Then after this it will lock up every time. I thought
I had it last time but after double checking it still freezes.
Still investigating to see if I can narrow the field.
> It is for sure something in this code:
>> Sub KillCommandBars()
[quoted text clipped - 78 lines]
>>> CommandBars("Menu Bar").Enabled = True
>>> End Sub