469,613 Members | 1,286 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

HELP - Problem getting Tony Toews's Performance Tip to resolve LDB locking problem to work.

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
Nov 12 '05 #1
2 2003
Does all of your other dao code work?

does the code compile?

Try:

Public rsAlwaysOpen As DAO.Recordset

Make sure you have the

Microsoft DAO 3.6 Object Library"

Checked in your references

Also, you could just bind the form to the table, and thus not even have to
open the reocrdset.

--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn
Nov 12 '05 #2
"Albert D. Kallal" <ka****@msn.com> wrote in message news:<pF*********************@news1.calgary.shaw.c a>...
Does all of your other dao code work?

does the code compile?

Try:

Public rsAlwaysOpen As DAO.Recordset

Make sure you have the

Microsoft DAO 3.6 Object Library"

Checked in your references

Also, you could just bind the form to the table, and thus not even have to
open the reocrdset.


The amended declaration and checking the reference as suggested - many thanks.

Oisin
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Nathaniel Branden | last post: by
16 posts views Thread by David W. Fenton | last post: by
15 posts views Thread by Jay | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.