Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: relationships

  1. #1
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi all,

    I have developed a small dB that keeps crashing and I can't seem to identify the cause. I have attached the dB back-end and was wondering if someone could please have a look at the design / relationships and provide some feedback.

    Regards,

    Van

    ps. sorry, having trouble with attachment
    Attached Files Attached Files

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='vanleblanc' post='764925' date='11-Mar-2009 21:39']ps. sorry, having trouble with attachment[/quote]
    To attach your zipped db, click on Browse, find the zip file and click on UPLOAD.
    Francois

  3. #3
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='Francois' post='764926' date='11-Mar-2009 21:44']To attach your zipped db, click on Browse, find the zip file and click on UPLOAD.[/quote]


    ok done. sorry about that

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Do the following for each table in the backend:
    • Open it in design view.
    • Activate the Properties window.
    • Set the "Subdatasheet name" property to [None].
    • Activate the Indexes window.
    • Remove duplicate indexes (if you have ID as primary key, and there is also another index on the ID field, delete the latter index)
    • Remove superfluous indexes (apart from the primary key, keep only indexes for fields on which you link to other tables or on which users weill frequently sort or search)
    • Delete the default value 0 for number fields unless it is appropriate for the field.

    Do the following for both the frontend and the backend:
    • Select Tools | Options...
    • Activate the General tab.
    • Clear the check box "Track Name AutoCorrect Info"

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    One other thing: I hope that you are aware that there are more relationships than those currently displayed in the Relationships window. If you click the button Show All Relationships on the toolbar (while the Relationships window is open), you'll see the others.

  6. #6
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much for the help Hans. I had no idea there were so many Indexes in use and how they got there! perhaps these changes will help.

    Kind Regards,

    Van

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    There's a setting in the Tables/Queries tab of Tools | Options... for automatically creating an index on a field if its name startsor ends with one of the specified strings. By default, ID is among those strings, so any field whose name ends in ID will have an index
    I always clear the AutoIndex box - I prefer to create indexes myself when I need them. (This is an application-level setting, you only need to set or clear it once; it will *not* affect existing fields however, only fields created from now on)

  8. #8
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='764937' date='11-Mar-2009 21:35']There's a setting in the Tables/Queries tab of Tools | Options... for automatically creating an index on a field if its name startsor ends with one of the specified strings. By default, ID is among those strings, so any field whose name ends in ID will have an index
    I always clear the AutoIndex box - I prefer to create indexes myself when I need them. (This is an application-level setting, you only need to set or clear it once; it will *not* affect existing fields however, only fields created from now on)[/quote]

    thanks Hans. I was just going to ask why all the indexes are back again after I went through and deleted as you've suggested.

    Regards,

    Van

  9. #9
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Hans,

    My dB is still crashing. It occurs when I scroll from record to record on the main form ("patient data" on the switchboard). It happens intermittently, but fairly often....can't figure out why? I've tried re-building the main form several times, but still same problem. Any suggestions? (i've attached the FE to this post, the BE is in my previous post).

    Regards,

    Van
    Attached Files Attached Files

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I decompiled the frontend (see [topic="44571"]this topic[/topic]) then compacted it.
    I've moved between records hundreds of times, switching between tabs in the meantime, etc., without any problem.

    Notes:
    • I noticed that you have several forms and reports with an empty code module. I would set the Has Module property of those to No. This wiol help reduce the size of the database.
    • I'd set the Allow Design Changes property for all forms to Design View Only.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I have attached the frontend, decompiled, compacted and zipped, with some of the changes I recommended. You'll have to relink all tables to the backend, so first open the database with Shift held down.
    Attached Files Attached Files

  12. #12
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks ever so much Hans. I've made all the changes you've suggested and so far I haven't been able to make it crash....fingers crossed!

    Now to pilot it with the users. I'm sure they'll find a way to crash it!

    Kind Regards,

    Van

  13. #13
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='764958' date='12-Mar-2009 00:19']I have attached the frontend, decompiled, compacted and zipped, with some of the changes I recommended. You'll have to relink all tables to the backend, so first open the database with Shift held down.[/quote]

    Hi again Hans,

    My dB is still crashing. I have identified the cause, but need help in fixing it. It has to do with referencing the tab control in the subform "treatment delivered", which is in the "patient data" form accessed from the switchboard. Everytime I enter new data in the subform, then close and re-open the main form and scroll to the next record, the dB crashes.

    is the correct syntax to reference the tab control in the subform as follows: Me!Subform1.Form!ControlName ?

    Thanks,

    Van

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    As far as I can tell, the cause of the crash is that if no treatment has been selected, you try to hide ALL tab pages of TabCtl10 on frm_TxDelivered.
    This probably clashes with setting the visibility of controls on the tab pages from both the main form and the subform, e.g. in the On Current event of the main form:

    If Me!frm_TxDelivered.Form!Sx = 1 Then
    Let Me!frm_TxDelivered.Form!Label628.Visible = True
    Let Me!frm_TxDelivered.Form!SxAnatomical.Visible = True
    Else
    Let Me!frm_TxDelivered.Form!Label628.Visible = False
    Let Me!frm_TxDelivered.Form!SxAnatomical.Visible = False
    End If

    and in the On Current event of the subform:

    If Sx = 1 Then
    Let Label628.Visible = True
    Let SxAnatomical.Visible = True
    Else
    Let Label628.Visible = False
    Let SxAnatomical.Visible = False
    End If

    I'd remove this kind of duplication.

  15. #15
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='765735' date='17-Mar-2009 01:40']As far as I can tell, the cause of the crash is that if no treatment has been selected, you try to hide ALL tab pages of TabCtl10 on frm_TxDelivered.
    This probably clashes with setting the visibility of controls on the tab pages from both the main form and the subform, e.g. in the On Current event of the main form:

    If Me!frm_TxDelivered.Form!Sx = 1 Then
    Let Me!frm_TxDelivered.Form!Label628.Visible = True
    Let Me!frm_TxDelivered.Form!SxAnatomical.Visible = True
    Else
    Let Me!frm_TxDelivered.Form!Label628.Visible = False
    Let Me!frm_TxDelivered.Form!SxAnatomical.Visible = False
    End If

    and in the On Current event of the subform:

    If Sx = 1 Then
    Let Label628.Visible = True
    Let SxAnatomical.Visible = True
    Else
    Let Label628.Visible = False
    Let SxAnatomical.Visible = False
    End If

    I'd remove this kind of duplication.[/quote]

    remove from the main form or the subform?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •