I have read Tony Toews's web site from which I have deduced I have an
LDB locking problem.
I have tried to follow his solution as follows:
1. I have created a dummy table in the back-end app. The Table is
called "Dummy" and contains no data and only one field - a replication
ID.
2. I have linked to this table from the front-end app.
3. I have created a blank form called "Dummy Form", the record source
for which is "Dummy".
4. In the module for this form, the following code appears
Public rsAlwaysOpen As Recordset
Private Sub Form_Close()
rsAlwaysOpen.Close
Set rsAlwaysOpen = Nothing
End Sub
Private Sub Form_Open(Cancel As Integer)
Set rsAlwaysOpen = CurrentDb.OpenRecordset("Dummy")
End Sub
5. Private Sub Form_Close() is attached to the On Close event
6. Private Sub Form_Open(Cancel as Integer) is attached to the On
Open event
However, when I try to open the form I receive the following error
message:
"Run time error 13: Type mis-match"
When I then press debug the line "Set rsAlwaysOpen =
CurrentDb.OpenRecordset("Dummy")" is highlighted in yellow.
I promise I have tried reading through the help pages but for the life
of me do not understand why I would be getting a type mismatch - a
table is a recordset isn't it?
Any help gratefully received.
Regards
Oisin