Unable to select records correctly in a Continuous Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have built several applications that use a continuous form to display a
series of records. When you click a record on the list, the record selector
automatically moves to the record clicked, giving that record 'focus' for
other operations.

I've imported one of these forms into a new application and it no longer
works! If I click a control on the continuous form, the first record on the
list retains 'focus' and is associated with the related operation.

Can anybody tell me what might be the cause?

Thanks,

Scott A
 
Sounds like you have some code running in one of the events that causes the
current record to reset.

For example a Requery would do that.
 
I'm afraid that's not the case.

I do have an event associated with the detail section of the continuous
form. When you double-click, it is supposed to open another form using the
record ID as link criteria. All of my applications use this code, but it
doesn't work in this one.

When you double-click any record (detail section) on this form, it opens the
new form with the record ID of the first record on the page.
 
To track down the cause, copy all the code from the form's module out to a
text module.

The set the form's HasModule property to No so the code is all gone. Save
the form without the code, and compact the database.

If the form works now, you can gradually bring the code back in until you
find the culprit. If it still doesn't work the problem is with something
else, such as the Timer event of another form.
 
Well, I've removed the code and compacted/repaired the database, have checked
for other events that would pull focus from the form, and can find nothing.

Even without any code behind the form, the continuous form is still not
behaving properly. Guess I'll have to build a new one from scratch and see
what happens.
 
Yep: if it fails even when HasModule is No, then a Decompile cannot rescue
it.

If you haven't already tried it, you could try the undocumented SaveAsText,
e.g.:
SaveAsText acForm, "Form1", "C:\Form1.txt"

If the form is really corrupt this is likely to fail. If it does work, you
import the form into your new database with:
LoadFromText acForm, "Form1", "C:\Form1.txt"
 
Back
Top