Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2003
    Posts
    4

    Unanswered: 2000 - 2002 Incompatibility ?

    I have an Access 2000 DB that I was/am developing fin on MSAccess 2000 on a win98 machine.
    Then I got a new machine and put XP with Access 2002 on it.

    When I tried opening my DB, all was fine to begin with, then when I try to open 1 particular form the whole application just closes and dissapears, no warning, nor errors, not even a delay as it closes down - you blink and it's gone.

    So thinking I had a corruption, I took my drive back to my 98/2000 machine and hey presto - the form works fine !?

    Hope someone can help ?

    The Vba which opens the form is here :

    Private Sub BUT_FullSeger_Click()
    DoCmd.Close acForm, "FullSeger", acSaveNo
    Form_FullSeger.Seger_xtab_subform.SourceObject = ""
    Form_FullSeger.Seger_xtab_subform.SourceObject = "Query.QRY_Seger_Crosstab"

    DoCmd.OpenForm "FullSeger"
    End Sub

    If needed, I guess I could post the whole DB on some webspace if anyone wants to look at the whole beast?!

    Hope someone can help?

    Regards
    Simon

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ?????????????

    Form_FullSeger.Seger_xtab_subform.SourceObject = "Query.QRY_Seger_Crosstab"
    'are you really really sure you have a valid .sourceoject called "Query.something..."?
    'i do lots of very strange things, but i have never ever called anything
    ' "Query.QRY_something"

    ...and is the empty .sourceobject really necessary: it looks ugly

    izy

  3. #3
    Join Date
    Feb 2002
    Location
    North Carolina
    Posts
    13

    Re: 2000 - 2002 Incompatibility ?

    Simon-

    Have you checked your References in the Code Window? If I'm not mistaken, Access 2002 automatically defaults to ADO instead of DAO. For that reason, some code written for A2000 will not run properly on A2002. Go to Tools | References in the Code Window and set a reference to the Microsoft DAO 3.6 Object Library.

    Hope this helps,
    j-Dog

  4. #4
    Join Date
    Sep 2003
    Posts
    4

    pending ....

    Apologies for not getting back to you - I haven't been able to trythis yet (long sotry) but will let you know the results asap !! basically I haven't been able to access my 2002 machine for a few days.

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    Form_FullSeger.Seger_xtab_subform.SourceObject = "Query.QRY_Seger_Crosstab"
    sorry to go on and on and on and on and on and on, but:

    Query.QRY_Seger_Crosstab is an illegal and ridiculous name for a query.

    and, a query is not a legal .SourceObject for a form (though it might make an excellent .RecordSource)

    izy

  6. #6
    Join Date
    Sep 2003
    Posts
    4

    names !

    izy,
    I appreciate your concern, and I know there are certain naming conventions I should follow for when I work on projects with other people etc etc etc .... but quite frankly, it works well for me !!

    The intial {Query.} seems unecessary, but Access put that in when I dragged my query into the parent form. And it throws an error if i try to remove it !!
    Basically the query acts as a subform/subreport within the parent, in datasheet view. By adding it to the parent in this way, I am not offered the option of using Recorsource, but works well with sourceobject (no, I don't fully understand the difference, maybe you can help explain?)
    The nature of the crosstab means that the number of columns and the column names change with each record of the parent form.
    To be honsest I struggled ot acheive this, but this seems to work, and works well (despite 'silly' names). - well it worked well until Access2002 !
    Yes, i suspect this arrangement is part of my overall problem as the ADO DAO thign didn't solve it unfortunately. Still, i think it unfair to work in 2000 and then not in 2002 !?

    I think that priorities are important in any project, and for me right now, having a database that actually works, is a much higher priority than one that doesn't work but has pretty names !

    The rest of the naming works well, as anyone looking at my SQL will know if I am accessing a table or a query {QRY_...} and the description ideally tells the user what the purpose of the query is {Seger_.... } (Seger is a chemical formula table used in ceramic glaze calculations) ..... and {Crosstab} shows me that it's a crosstab quer

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    you are 100% right.

    i had never tried "Query.nameOfQuery" as a .sourceobject. i just did, and it works perfectly (in a2k) as you say. wonderful.

    izy

  8. #8
    Join Date
    Sep 2003
    Posts
    4

    Query.QueryName ....

    Lol !!!
    Gets confusing doesn't it ?!(&(*

    I guess that by using sourceobject, it is not just refering to the recordsource, as in the data itself.... but it is refering to the structure holding the data and bringing back the details of each field definition ?

    Will be back on 2002 this weekend so will try and narow down whether this is the bit 2002 is having difficulty with.

Posting Permissions

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