Subform Data Blues 
Author Message
 Subform Data Blues

Hi

I'm wondering if any of you brainy folk out there have any advice for
me?  I've run into a bit of a problem with Access 97 and subforms.

My app has been running fine, but has now decided not to refresh a
subform correctly.  It's displaying a the wrong records, which have no
relationship to the data displayed on the main form.  Compacting the
database cures the problem, but it's happend about half a dozen times
now and I can't rely on the app any more.

Any hints/tips would be very gratefully received.

Richard T

--== Sent via Deja.com http://www.*-*-*.com/
---Share what you know. Learn what you don't.---



Sat, 03 Nov 2001 03:00:00 GMT  
 Subform Data Blues
Try de-linking the subform with the main form.
Save the form.
Close the db.
Repair and compact.
Reopen the db.
Reestablish the parent child link fields.
Save the form.
Close the db.
Repair and compact.

If that doesn't hold you will probably need to redo the form.

Bill McKnight


| Hi
|
| I'm wondering if any of you brainy folk out there have any advice
for
| me?  I've run into a bit of a problem with Access 97 and subforms.
|
| My app has been running fine, but has now decided not to refresh a
| subform correctly.  It's displaying a the wrong records, which have
no
| relationship to the data displayed on the main form.  Compacting the
| database cures the problem, but it's happend about half a dozen
times
| now and I can't rely on the app any more.
|
| Any hints/tips would be very gratefully received.
|
| Richard T
|
|
| --== Sent via Deja.com http://www.deja.com/ ==--
| ---Share what you know. Learn what you don't.---



Sat, 03 Nov 2001 03:00:00 GMT  
 Subform Data Blues
Some ideas:
1. Open the form in Design view. Check the LinkChildFields and
   LinkMasterFields properties.

2. Check for any code that is changing the SourceObject property
   of the subform control, or the RecordSource object of the form
   in the subform control. You may need to check the LinkChildFields
   and MasterLinkFields again after the code has run.

3. It's possible that your database is corrupting. I've found that
   this can occur when you edit the module of a form while the form
   is open (not in Design view). Subjectively, it seems that Access
   gets confused about which is the real form, and which is the
   modified copy it makes (which is discarded if you elect not to
   save your changes.)

To repair a corruption, try this sequence:
1. Select the form in the database window, copy, and paste.
2. Do the same for the subform. (This forces Access to recreate them.)
3. Delete the original 2 forms.
4. Compact the database. (This destroys any reference to the deleted
forms.)
5. Rename new forms to the old ones if you wish.

If you still have corruption after this, try creating a new (blank)
database and importing all objects so Access creates them all.

Quote:

> I'm wondering if any of you brainy folk out there have any advice for
> me?  I've run into a bit of a problem with Access 97 and subforms.

> My app has been running fine, but has now decided not to refresh a
> subform correctly.  It's displaying a the wrong records, which have no
> relationship to the data displayed on the main form.  Compacting the
> database cures the problem, but it's happend about half a dozen times
> now and I can't rely on the app any more.

> Any hints/tips would be very gratefully received.



Sun, 04 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Insert Data in SubForms with DBGrid and Data Control

2. data grid blues

3. Data report blues...

4. RECORD data BLUES...

5. Data Grid Blues

6. Referencing a field on a SubForm within a Subform

7. Control name of subform from code behind subform

8. Question about the SubForm Object to help reference a subform

9. navigating for keyboard users - subfrom to form - subform to subform

10. Subform refresh moves last record to top of subform

11. tabbing from subform to subform

12. changing the sourceobject of subform when the form and subform are loaded

 

 
Powered by phpBB® Forum Software