troubleshooting Question

DAO recordset problems

Avatar of jmiller56
jmiller56 asked on
Microsoft Access
3 Comments1 Solution535 ViewsLast Modified:
I am developing an mdb application with considerable VBA behind some fairly involved forms/subforms.  The version is Access2000.

I an earlier version of this system, everything worked fine.  But now I have the following problem for some reason:

In subform B, I have a field with an "AfterUpdate" handler.  In this handler I create a reference to subform A, and I create a handle to subform A's bound recordset (not clone).  A total from subform B is put into this recordset.

Problem:  When I try to access the recordset (.edit), I get an error.  The .absoluteposition of this rst is -1 (should be 0 to (RecordCount-1)).  This works in my previous version, but for some reason in my current version, the absoluteposition value of -1 indicates that either the recordset does not support this function, or it doesn't exist.  I believe it exists.  It is a regular dynaset, and I the form.CurrentRecord is 1 (first record).

This only happens when I first open the form and the record selected is the first one in subform A.  After I move to a different record (manually), this issue disappears and all works well.

Any ideas why this would be happening?



Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros