D
David Anderson
I'm tearing my hair out over a bug that has just arisen in one of my Access
2000 forms - at least I would be, if I had any hair left.
I have a bound continuous form of payment records (called PaymentsList) with
a command button that opens a modal popup form (called EditPayments) for
editing a specific payment. The standard Access 2000 command button wizard
click event code is as follows,
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "EditPayments"
stLinkCriteria = "[PaymentDate]=" & "#" & Me![PaymentDate] & "#"
DoCmd.openForm stDocName, , , stLinkCriteria
Up to three days ago, this worked fine. I could create a new payment and
edit it immediately. Yesterday, everything went pear-shaped. Any old record
in my Payments table (saved 3 or more days ago) can be edited but no newly
created record is found via the [PaymentDate] linking criterion. The popup
recordset has a RecordCount of zero why I try to edit a recent record. This
behaviour is consistent, i.e. all old payment records can be edited but none
of the new ones. I can't remember making any recent design changes of
potential relevance to this problem (but my memory is fallible).
The underlying query of my PaymentsList form is quite happy to find a newly
created payment record using a specified payment date, so why is my
DoCmd.openForm process failing? How can it find one record but not another,
when they both have the same type of information stored in the Payments
table?
Suspecting some form of database corruption, I have created new versions of
both my front and back end, importing all the tables, etc, from the original
versions. I have tried deleting all the indexes from my Payments table
definition, saving it, and then recreating the indexes. So far, nothing has
worked.
I'm totally flummoxed. Any guidance on this would be greatly appreciated!
David
2000 forms - at least I would be, if I had any hair left.
I have a bound continuous form of payment records (called PaymentsList) with
a command button that opens a modal popup form (called EditPayments) for
editing a specific payment. The standard Access 2000 command button wizard
click event code is as follows,
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "EditPayments"
stLinkCriteria = "[PaymentDate]=" & "#" & Me![PaymentDate] & "#"
DoCmd.openForm stDocName, , , stLinkCriteria
Up to three days ago, this worked fine. I could create a new payment and
edit it immediately. Yesterday, everything went pear-shaped. Any old record
in my Payments table (saved 3 or more days ago) can be edited but no newly
created record is found via the [PaymentDate] linking criterion. The popup
recordset has a RecordCount of zero why I try to edit a recent record. This
behaviour is consistent, i.e. all old payment records can be edited but none
of the new ones. I can't remember making any recent design changes of
potential relevance to this problem (but my memory is fallible).
The underlying query of my PaymentsList form is quite happy to find a newly
created payment record using a specified payment date, so why is my
DoCmd.openForm process failing? How can it find one record but not another,
when they both have the same type of information stored in the Payments
table?
Suspecting some form of database corruption, I have created new versions of
both my front and back end, importing all the tables, etc, from the original
versions. I have tried deleting all the indexes from my Payments table
definition, saving it, and then recreating the indexes. So far, nothing has
worked.
I'm totally flummoxed. Any guidance on this would be greatly appreciated!
David