I've already posted about this problem in microsoft.public.access, but
nobody there could help (though a few tried). I just found out about
this group, so I thought maybe I'd have better luck here.
The switchboard form will open for multiple users. But when two users
try to open the same form, the Access will just hang, showing the
hourglass, until the first user closes the form. Then the form will
open for the second user.
Here is what I've already checked
1. The database is split into FE and BE.
2. FE (MDE) is on user machine, BE (MDB) on server
3. All users have full permissions for the folder where the MDB file
is
4. The forms are set to "No Locks"
5. The queries that populate the forms are set to "No Locks"
6. Tools/Options/Advanced is set to Shared and record-level lock
Other pertinent observations
1. The database works fine - one user at a time
2. The LDB file gets created in the folder housing the BE
3. I even tried changing Tools/Options/Advanced to "Exclusive" so the
second user would at least get a warning that the DB was in use. No
change in behavior. No warning, it just hangs and opens the form when
the first user closes the form.
My DB is designed to help teachers in my department (I teach math) keep
track of which textbook was assigned to which student. A majority of
students switch teachers (but not courses) at the semester. So my
forms use queries to display data from a table with student data with a
table that stores the textbook data. There is also a separate table
that stores data ABOUT the texts - i.e. author, publisher, etc. The
table I'm referring to stores student ID and Textbook ID so we can
record which text a given student has been given.
My forms use VBA quite heavily, including code that determines which
query populates the form. One query gets first semester student data,
the other gets second semester student data. The table that holds the
textbook data is the same and joined by the student ID number to both
student data tables - one per query.
I'm a rank amateur, a math teacher who has taught high school level
programming and took a month-long Access class several years ago. I'm
not even getting paid for this - it is my contribution to the
department. Any help would be greatly appreciated.
jamiew - 07 Oct 2005 16:21 GMT
Redbeard, I'm having the same problem and I've done the same things you have
If you figure this out PLEASE share it.
> I've already posted about this problem in microsoft.public.access, but
> nobody there could help (though a few tried). I just found out about
[quoted text clipped - 41 lines]
> not even getting paid for this - it is my contribution to the
> department. Any help would be greatly appreciated.
Redbeard - 08 Oct 2005 03:35 GMT
> Redbeard, I'm having the same problem and I've done the same things you have
> If you figure this out PLEASE share it.
Will do. But first I have to get it figured out.
Al Borges - 09 Oct 2005 16:28 GMT
Hi guys:
It's behaving like you still have record locking set at "all records". What
you may be expeiriencing is a corrupt form... it may be set to one thing,
but doing another. Have you tried substituting a new form with similar
settings, including the "no locks" or only "edited record" lock setting?
I would also compact and repair your database backend tables. If the problem
still persists, get everyone out of the backend database and delete any
persistent *.idb record locks using windows explorer.
Regards,
Al
You are going to have to isolate the problem first
>> Redbeard, I'm having the same problem and I've done the same things you
>> have
>> If you figure this out PLEASE share it.
>
> Will do. But first I have to get it figured out.
jamiew - 10 Oct 2005 15:57 GMT
I got it! Well, our awesome IT guy got it. I had an old Novell Client
loaded on my computer. I'm sorry I don't know what he went to but as soon as
he updated it, my database worked. I hope this will help you as well.
> > Redbeard, I'm having the same problem and I've done the same things you have
> > If you figure this out PLEASE share it.
>
> Will do. But first I have to get it figured out.
Gijs Beukenoot - 08 Oct 2005 11:44 GMT
From Redbeard :
> I've already posted about this problem in microsoft.public.access, but
> nobody there could help (though a few tried). I just found out about
[quoted text clipped - 4 lines]
> hourglass, until the first user closes the form. Then the form will
> open for the second user.
Will it hang forever or eventually time-out wit han error?
Do you have any On Error in your VBA that retries (resume) the action
it errored on?
Does this happen with this form only or with others too?
I'm not sure on what and where your form uses code but I would probably
start by adding a small function that writes events to a textfile.
Then, in the form_load, form_current (and other functions that are
called in your form), add lines at certain points in your code to see
if it gets there. Then, examine the log to see if you can make any
sense ofwhat it's doing. Something like:
Private sub Form_Load
dim iWhereAmI as Integer
iWhereAmI = 1
Call LogWrite(me.name & " Action = " & cstr(iWhereAmI))
<whatever your're doing part 1>
iWhereAmI = 2
Call LogWrite(me.name & " Action = " & cstr(iWhereAmI))
<whatever your're doing part 2>
iWhereAmI = 3
Call LogWrite(me.name & " Action = " & cstr(iWhereAmI))
<whatever your're doing part 3>
End Sub
If you add some code like this to every function that is calles, you
will probaly find out that it suddenly stops writing to the logfile and
you might be able to locate the point of failure.
You can start out by perhaps just adding lines to all the events you're
using and then add more to any particular one that seems to be the one
where it happens.
Public Function LogWrite(sLine as String)
Dim iOpenFile As Integer
iOpenFile = FreeFile(0)
Open "C:\MyLogFile.Txt" For Append As iOpenFile
Print #iOpenFile, sLine
Close iOpenFile
End Function
Redbeard - 11 Oct 2005 16:32 GMT
Thanks for the suggestion. I'll give it a try.
tina - 08 Oct 2005 19:51 GMT
can you post the code that runs on the form's Open and Load events?
> I've already posted about this problem in microsoft.public.access, but
> nobody there could help (though a few tried). I just found out about
[quoted text clipped - 41 lines]
> not even getting paid for this - it is my contribution to the
> department. Any help would be greatly appreciated.
Redbeard - 11 Oct 2005 16:42 GMT
Been away for a couple of days...
No Load event. The Open event just calls the Hide_Detail method, which
makes parts of the form invisible or disabled. Those objects are
selectively reenabled based on what the user does latere. All of the
objects mentioned are in the form, which is in the FE. No connection
to the BE that I can think of. The underlying query does query the
tables in the BE.
Private Sub Form_Open(Cancel As Integer)
Hide_Detail
End Sub
Private Sub Hide_Detail()
Detail.Visible = False
'makes labels in header invisible while detail is invisible
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Text5.Visible = False
Text6.Visible = False
Text7.Visible = False
Form.NavigationButtons = False
AddStudentBTN.Enabled = False
PreviewReportBTN.Enabled = False
PrintReportBTN.Enabled = False
End Sub
tina - 12 Oct 2005 14:56 GMT
well, i had a WAG, but there's nothing in your code to suggest it would be a
"good" WAG. sorry i wasn't any help.
> Been away for a couple of days...
>
[quoted text clipped - 27 lines]
>
> End Sub
Redbeard - 14 Oct 2005 21:01 GMT
Hey, thanks for trying.
WAG? Wild A$$ Guess?
tina - 15 Oct 2005 20:26 GMT
you got it <g>
> Hey, thanks for trying.
>
> WAG? Wild A$$ Guess?