Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Version problem

Discussion in 'Information Technology' started by SimonW, Jul 28, 2006.

  1. SimonW

    SimonW
    Expand Collapse
    Guest

    Helllo
    I've developed a simple mainform with two nested subforms i.e. customers,
    orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win Xp SP2
    and a fully up to date office 2k installation. I had to add DAO 3.6 along
    the way because of a Microsoft script I've used (probably GetUserName())

    Problem: When I take the file to the customer who has Access 2002, it
    crashes when the main form is navigated.

    I've tried converting, emptying tables and compacting, no joy...

    Any ideas, anyone - please

    TIA, Simon
     
  2. Loading...


  3. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Hi, Simon.

    > I had to add DAO 3.6 along
    > the way because of a Microsoft script I've used (probably GetUserName())


    That's not good enough. Once you've added a library that contains classes
    of the same name as other libraries, the Access compiler will assume the code
    is using the first class name encountered in the libraries on the list of
    References, unless you explicitly indicate which library to use. That means
    the library that shows up higher in the list will have precedence over those
    libraries lower in the list.

    Either you can hope that other computers that this application is deployed
    on have the same libraries as your computer does (in the same paths), and in
    the same order of precedence, or you can explicitly declare variables. For
    example, the Recordset object is a common class object in both the DAO and
    ADO libraries, but Access 2000 and 2002 use the ADO library be default,
    without the DAO library. Therefore, when both the DAO and ADO libraries are
    Referenced, the following declaration needs to be used if the DAO library is
    needed:

    Dim recSet As DAO.Recordset

    .. . . and the following declaration needs to be used if the ADO library is
    needed:

    Dim recSet As ADODB.Recordset

    For more information on the use of these two libraries, please see the link
    to Tom Wickerath's article, "ADO and DAO Library References in Access
    Databases" on the following Web page:

    http://www.Access.QBuilt.com/html/articles.html

    > Problem: When I take the file to the customer who has Access 2002, it
    > crashes when the main form is navigated.


    Did you compile the code first before running the application? It probably
    has compile errors that you need to resolve before it will run correctly on a
    computer with a different version of Access and a different configuration
    (i.e., different paths for the library files).

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.


    "SimonW" wrote:

    > Helllo
    > I've developed a simple mainform with two nested subforms i.e. customers,
    > orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win Xp SP2
    > and a fully up to date office 2k installation. I had to add DAO 3.6 along
    > the way because of a Microsoft script I've used (probably GetUserName())
    >
    > Problem: When I take the file to the customer who has Access 2002, it
    > crashes when the main form is navigated.
    >
    > I've tried converting, emptying tables and compacting, no joy...
    >
    > Any ideas, anyone - please
    >
    > TIA, Simon
     
  4. SimonW

    SimonW
    Expand Collapse
    Guest

    Hi, thanks for the ticking off, I know I needed it...

    Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    excuse!

    Honestly, I did compile. The code is quite sweet. I commented out
    OnCurrent() in case RecordsetClone.RecordCount = 0 was a problem - it wasn't.

    My references are, in order

    Visual Basic For Applications
    Microsoft Access 9.0 Object Library
    OLE Automation
    Microsoft DAO 3.6 Object Library

    OnNotInList() uses Dim db As Database which requires DAO 3.6, that's why I
    had to add it.

    I cannot see any other issue here other that corruption. Do you agree ?

    TIA, Simon






    "'69 Camaro" wrote:

    > Hi, Simon.
    >
    > > I had to add DAO 3.6 along
    > > the way because of a Microsoft script I've used (probably GetUserName())

    >
    > That's not good enough. Once you've added a library that contains classes
    > of the same name as other libraries, the Access compiler will assume the code
    > is using the first class name encountered in the libraries on the list of
    > References, unless you explicitly indicate which library to use. That means
    > the library that shows up higher in the list will have precedence over those
    > libraries lower in the list.
    >
    > Either you can hope that other computers that this application is deployed
    > on have the same libraries as your computer does (in the same paths), and in
    > the same order of precedence, or you can explicitly declare variables. For
    > example, the Recordset object is a common class object in both the DAO and
    > ADO libraries, but Access 2000 and 2002 use the ADO library be default,
    > without the DAO library. Therefore, when both the DAO and ADO libraries are
    > Referenced, the following declaration needs to be used if the DAO library is
    > needed:
    >
    > Dim recSet As DAO.Recordset
    >
    > . . . and the following declaration needs to be used if the ADO library is
    > needed:
    >
    > Dim recSet As ADODB.Recordset
    >
    > For more information on the use of these two libraries, please see the link
    > to Tom Wickerath's article, "ADO and DAO Library References in Access
    > Databases" on the following Web page:
    >
    > http://www.Access.QBuilt.com/html/articles.html
    >
    > > Problem: When I take the file to the customer who has Access 2002, it
    > > crashes when the main form is navigated.

    >
    > Did you compile the code first before running the application? It probably
    > has compile errors that you need to resolve before it will run correctly on a
    > computer with a different version of Access and a different configuration
    > (i.e., different paths for the library files).
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    > http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
    >
    >
    > "SimonW" wrote:
    >
    > > Helllo
    > > I've developed a simple mainform with two nested subforms i.e. customers,
    > > orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win Xp SP2
    > > and a fully up to date office 2k installation. I had to add DAO 3.6 along
    > > the way because of a Microsoft script I've used (probably GetUserName())
    > >
    > > Problem: When I take the file to the customer who has Access 2002, it
    > > crashes when the main form is navigated.
    > >
    > > I've tried converting, emptying tables and compacting, no joy...
    > >
    > > Any ideas, anyone - please
    > >
    > > TIA, Simon
     
  5. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Hi, Simon.

    > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    > excuse!


    I'm nearly blind, I have rheumatoid arthritis so bad I can hardly move my
    joints much of the time, and I've injured one hand badly enough that I've
    been typing one-handed and using the mouse a lot more than I used to -- so
    much that I've worn out the clicker in one mouse and I see signs of this
    happening on another mouse that's less than a year old. My hair is much
    thinner as a result of side effects of some medications, but at least I have
    some of it left. But I sympathize with your having teenagers. Teenagers can
    drive you nuts.

    > Honestly, I did compile.


    On the Access 2002 computer? It has different versions of libraries and
    possibly different library paths to the default libraries than your own
    computer's configuration has.

    > I cannot see any other issue here other that corruption. Do you agree ?


    It's possible that the main form is corrupt. First, make a copy of your
    database file. Work only with this file copy for the next steps, so that if
    anything goes wrong, you still have the original.

    Copy the code in the main form's module into a text file. Next, import the
    main form into a brand new database. In the brand new database, remove the
    code behind the form and save the form, then compact the new database. Open
    the form's module in the brand new database and paste the code from the text
    file into the module, then save and compile. Compact the brand new database
    and close it.

    Delete the original main form in the database copy and compact the database.
    Import the main form from the brand new database. Compile the code and see
    if the main form works as it should. If not, try opening the database copy
    with the /decompile switch, then recompile the code and see whether the main
    form works as it should.

    If you need help with the /decompile switch, please post back.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.


    "SimonW" wrote:

    > Hi, thanks for the ticking off, I know I needed it...
    >
    > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    > excuse!
    >
    > Honestly, I did compile. The code is quite sweet. I commented out
    > OnCurrent() in case RecordsetClone.RecordCount = 0 was a problem - it wasn't.
    >
    > My references are, in order
    >
    > Visual Basic For Applications
    > Microsoft Access 9.0 Object Library
    > OLE Automation
    > Microsoft DAO 3.6 Object Library
    >
    > OnNotInList() uses Dim db As Database which requires DAO 3.6, that's why I
    > had to add it.
    >
    > I cannot see any other issue here other that corruption. Do you agree ?
    >
    > TIA, Simon
    >
    >
    >
    >
    >
    >
    > "'69 Camaro" wrote:
    >
    > > Hi, Simon.
    > >
    > > > I had to add DAO 3.6 along
    > > > the way because of a Microsoft script I've used (probably GetUserName())

    > >
    > > That's not good enough. Once you've added a library that contains classes
    > > of the same name as other libraries, the Access compiler will assume the code
    > > is using the first class name encountered in the libraries on the list of
    > > References, unless you explicitly indicate which library to use. That means
    > > the library that shows up higher in the list will have precedence over those
    > > libraries lower in the list.
    > >
    > > Either you can hope that other computers that this application is deployed
    > > on have the same libraries as your computer does (in the same paths), and in
    > > the same order of precedence, or you can explicitly declare variables. For
    > > example, the Recordset object is a common class object in both the DAO and
    > > ADO libraries, but Access 2000 and 2002 use the ADO library be default,
    > > without the DAO library. Therefore, when both the DAO and ADO libraries are
    > > Referenced, the following declaration needs to be used if the DAO library is
    > > needed:
    > >
    > > Dim recSet As DAO.Recordset
    > >
    > > . . . and the following declaration needs to be used if the ADO library is
    > > needed:
    > >
    > > Dim recSet As ADODB.Recordset
    > >
    > > For more information on the use of these two libraries, please see the link
    > > to Tom Wickerath's article, "ADO and DAO Library References in Access
    > > Databases" on the following Web page:
    > >
    > > http://www.Access.QBuilt.com/html/articles.html
    > >
    > > > Problem: When I take the file to the customer who has Access 2002, it
    > > > crashes when the main form is navigated.

    > >
    > > Did you compile the code first before running the application? It probably
    > > has compile errors that you need to resolve before it will run correctly on a
    > > computer with a different version of Access and a different configuration
    > > (i.e., different paths for the library files).
    > >
    > > HTH.
    > > Gunny
    > >
    > > See http://www.QBuilt.com for all your database needs.
    > > See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    > > http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
    > >
    > >
    > > "SimonW" wrote:
    > >
    > > > Helllo
    > > > I've developed a simple mainform with two nested subforms i.e. customers,
    > > > orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win Xp SP2
    > > > and a fully up to date office 2k installation. I had to add DAO 3.6 along
    > > > the way because of a Microsoft script I've used (probably GetUserName())
    > > >
    > > > Problem: When I take the file to the customer who has Access 2002, it
    > > > crashes when the main form is navigated.
    > > >
    > > > I've tried converting, emptying tables and compacting, no joy...
    > > >
    > > > Any ideas, anyone - please
    > > >
    > > > TIA, Simon
     
  6. SimonW

    SimonW
    Expand Collapse
    Guest

    Many thanks, I'll perform the recommended steps later this morning and get
    back to you....

    Best wishes, Simon
    I

    "'69 Camaro" wrote:

    > Hi, Simon.
    >
    > > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    > > excuse!

    >
    > I'm nearly blind, I have rheumatoid arthritis so bad I can hardly move my
    > joints much of the time, and I've injured one hand badly enough that I've
    > been typing one-handed and using the mouse a lot more than I used to -- so
    > much that I've worn out the clicker in one mouse and I see signs of this
    > happening on another mouse that's less than a year old. My hair is much
    > thinner as a result of side effects of some medications, but at least I have
    > some of it left. But I sympathize with your having teenagers. Teenagers can
    > drive you nuts.
    >
    > > Honestly, I did compile.

    >
    > On the Access 2002 computer? It has different versions of libraries and
    > possibly different library paths to the default libraries than your own
    > computer's configuration has.
    >
    > > I cannot see any other issue here other that corruption. Do you agree ?

    >
    > It's possible that the main form is corrupt. First, make a copy of your
    > database file. Work only with this file copy for the next steps, so that if
    > anything goes wrong, you still have the original.
    >
    > Copy the code in the main form's module into a text file. Next, import the
    > main form into a brand new database. In the brand new database, remove the
    > code behind the form and save the form, then compact the new database. Open
    > the form's module in the brand new database and paste the code from the text
    > file into the module, then save and compile. Compact the brand new database
    > and close it.
    >
    > Delete the original main form in the database copy and compact the database.
    > Import the main form from the brand new database. Compile the code and see
    > if the main form works as it should. If not, try opening the database copy
    > with the /decompile switch, then recompile the code and see whether the main
    > form works as it should.
    >
    > If you need help with the /decompile switch, please post back.
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    > http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
    >
    >
    > "SimonW" wrote:
    >
    > > Hi, thanks for the ticking off, I know I needed it...
    > >
    > > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    > > excuse!
    > >
    > > Honestly, I did compile. The code is quite sweet. I commented out
    > > OnCurrent() in case RecordsetClone.RecordCount = 0 was a problem - it wasn't.
    > >
    > > My references are, in order
    > >
    > > Visual Basic For Applications
    > > Microsoft Access 9.0 Object Library
    > > OLE Automation
    > > Microsoft DAO 3.6 Object Library
    > >
    > > OnNotInList() uses Dim db As Database which requires DAO 3.6, that's why I
    > > had to add it.
    > >
    > > I cannot see any other issue here other that corruption. Do you agree ?
    > >
    > > TIA, Simon
    > >
    > >
    > >
    > >
    > >
    > >
    > > "'69 Camaro" wrote:
    > >
    > > > Hi, Simon.
    > > >
    > > > > I had to add DAO 3.6 along
    > > > > the way because of a Microsoft script I've used (probably GetUserName())
    > > >
    > > > That's not good enough. Once you've added a library that contains classes
    > > > of the same name as other libraries, the Access compiler will assume the code
    > > > is using the first class name encountered in the libraries on the list of
    > > > References, unless you explicitly indicate which library to use. That means
    > > > the library that shows up higher in the list will have precedence over those
    > > > libraries lower in the list.
    > > >
    > > > Either you can hope that other computers that this application is deployed
    > > > on have the same libraries as your computer does (in the same paths), and in
    > > > the same order of precedence, or you can explicitly declare variables. For
    > > > example, the Recordset object is a common class object in both the DAO and
    > > > ADO libraries, but Access 2000 and 2002 use the ADO library be default,
    > > > without the DAO library. Therefore, when both the DAO and ADO libraries are
    > > > Referenced, the following declaration needs to be used if the DAO library is
    > > > needed:
    > > >
    > > > Dim recSet As DAO.Recordset
    > > >
    > > > . . . and the following declaration needs to be used if the ADO library is
    > > > needed:
    > > >
    > > > Dim recSet As ADODB.Recordset
    > > >
    > > > For more information on the use of these two libraries, please see the link
    > > > to Tom Wickerath's article, "ADO and DAO Library References in Access
    > > > Databases" on the following Web page:
    > > >
    > > > http://www.Access.QBuilt.com/html/articles.html
    > > >
    > > > > Problem: When I take the file to the customer who has Access 2002, it
    > > > > crashes when the main form is navigated.
    > > >
    > > > Did you compile the code first before running the application? It probably
    > > > has compile errors that you need to resolve before it will run correctly on a
    > > > computer with a different version of Access and a different configuration
    > > > (i.e., different paths for the library files).
    > > >
    > > > HTH.
    > > > Gunny
    > > >
    > > > See http://www.QBuilt.com for all your database needs.
    > > > See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    > > > http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
    > > >
    > > >
    > > > "SimonW" wrote:
    > > >
    > > > > Helllo
    > > > > I've developed a simple mainform with two nested subforms i.e. customers,
    > > > > orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win Xp SP2
    > > > > and a fully up to date office 2k installation. I had to add DAO 3.6 along
    > > > > the way because of a Microsoft script I've used (probably GetUserName())
    > > > >
    > > > > Problem: When I take the file to the customer who has Access 2002, it
    > > > > crashes when the main form is navigated.
    > > > >
    > > > > I've tried converting, emptying tables and compacting, no joy...
    > > > >
    > > > > Any ideas, anyone - please
    > > > >
    > > > > TIA, Simon
     
  7. SimonW

    SimonW
    Expand Collapse
    Guest

    Hi
    Sorry for the delay in getting back to you, I had to go to the office of the
    people I'm doing this job for becasue they have Access 10, I'm developing it
    on Access9. It's 9 miles away in Penzance England

    Anyway, I went through your suggestions carefully but still got the crash.
    However, you got me thinking and I isolated each subform and worked on its
    code. I discovered that the corrupted code was in the first subform (orders)
    OnCurrent event, where I am requerying the nested (Order Details) subform to
    display the details of the selected order.

    This seemed to be an incorrect statement
    Me.Parent![order details subform].Requery

    so I refined it with. The list of properties and constants wasn't much help.
    Form_orders.orders_detail_subform.Requery

    So there we are, many thanks, I needed that 2nd head ...

    Best wishes, Simon


    "'69 Camaro" wrote:

    > Hi, Simon.
    >
    > > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    > > excuse!

    >
    > I'm nearly blind, I have rheumatoid arthritis so bad I can hardly move my
    > joints much of the time, and I've injured one hand badly enough that I've
    > been typing one-handed and using the mouse a lot more than I used to -- so
    > much that I've worn out the clicker in one mouse and I see signs of this
    > happening on another mouse that's less than a year old. My hair is much
    > thinner as a result of side effects of some medications, but at least I have
    > some of it left. But I sympathize with your having teenagers. Teenagers can
    > drive you nuts.
    >
    > > Honestly, I did compile.

    >
    > On the Access 2002 computer? It has different versions of libraries and
    > possibly different library paths to the default libraries than your own
    > computer's configuration has.
    >
    > > I cannot see any other issue here other that corruption. Do you agree ?

    >
    > It's possible that the main form is corrupt. First, make a copy of your
    > database file. Work only with this file copy for the next steps, so that if
    > anything goes wrong, you still have the original.
    >
    > Copy the code in the main form's module into a text file. Next, import the
    > main form into a brand new database. In the brand new database, remove the
    > code behind the form and save the form, then compact the new database. Open
    > the form's module in the brand new database and paste the code from the text
    > file into the module, then save and compile. Compact the brand new database
    > and close it.
    >
    > Delete the original main form in the database copy and compact the database.
    > Import the main form from the brand new database. Compile the code and see
    > if the main form works as it should. If not, try opening the database copy
    > with the /decompile switch, then recompile the code and see whether the main
    > form works as it should.
    >
    > If you need help with the /decompile switch, please post back.
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    > http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
    >
    >
    > "SimonW" wrote:
    >
    > > Hi, thanks for the ticking off, I know I needed it...
    > >
    > > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    > > excuse!
    > >
    > > Honestly, I did compile. The code is quite sweet. I commented out
    > > OnCurrent() in case RecordsetClone.RecordCount = 0 was a problem - it wasn't.
    > >
    > > My references are, in order
    > >
    > > Visual Basic For Applications
    > > Microsoft Access 9.0 Object Library
    > > OLE Automation
    > > Microsoft DAO 3.6 Object Library
    > >
    > > OnNotInList() uses Dim db As Database which requires DAO 3.6, that's why I
    > > had to add it.
    > >
    > > I cannot see any other issue here other that corruption. Do you agree ?
    > >
    > > TIA, Simon
    > >
    > >
    > >
    > >
    > >
    > >
    > > "'69 Camaro" wrote:
    > >
    > > > Hi, Simon.
    > > >
    > > > > I had to add DAO 3.6 along
    > > > > the way because of a Microsoft script I've used (probably GetUserName())
    > > >
    > > > That's not good enough. Once you've added a library that contains classes
    > > > of the same name as other libraries, the Access compiler will assume the code
    > > > is using the first class name encountered in the libraries on the list of
    > > > References, unless you explicitly indicate which library to use. That means
    > > > the library that shows up higher in the list will have precedence over those
    > > > libraries lower in the list.
    > > >
    > > > Either you can hope that other computers that this application is deployed
    > > > on have the same libraries as your computer does (in the same paths), and in
    > > > the same order of precedence, or you can explicitly declare variables. For
    > > > example, the Recordset object is a common class object in both the DAO and
    > > > ADO libraries, but Access 2000 and 2002 use the ADO library be default,
    > > > without the DAO library. Therefore, when both the DAO and ADO libraries are
    > > > Referenced, the following declaration needs to be used if the DAO library is
    > > > needed:
    > > >
    > > > Dim recSet As DAO.Recordset
    > > >
    > > > . . . and the following declaration needs to be used if the ADO library is
    > > > needed:
    > > >
    > > > Dim recSet As ADODB.Recordset
    > > >
    > > > For more information on the use of these two libraries, please see the link
    > > > to Tom Wickerath's article, "ADO and DAO Library References in Access
    > > > Databases" on the following Web page:
    > > >
    > > > http://www.Access.QBuilt.com/html/articles.html
    > > >
    > > > > Problem: When I take the file to the customer who has Access 2002, it
    > > > > crashes when the main form is navigated.
    > > >
    > > > Did you compile the code first before running the application? It probably
    > > > has compile errors that you need to resolve before it will run correctly on a
    > > > computer with a different version of Access and a different configuration
    > > > (i.e., different paths for the library files).
    > > >
    > > > HTH.
    > > > Gunny
    > > >
    > > > See http://www.QBuilt.com for all your database needs.
    > > > See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    > > > http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
    > > >
    > > >
    > > > "SimonW" wrote:
    > > >
    > > > > Helllo
    > > > > I've developed a simple mainform with two nested subforms i.e. customers,
    > > > > orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win Xp SP2
    > > > > and a fully up to date office 2k installation. I had to add DAO 3.6 along
    > > > > the way because of a Microsoft script I've used (probably GetUserName())
    > > > >
    > > > > Problem: When I take the file to the customer who has Access 2002, it
    > > > > crashes when the main form is navigated.
    > > > >
    > > > > I've tried converting, emptying tables and compacting, no joy...
    > > > >
    > > > > Any ideas, anyone - please
    > > > >
    > > > > TIA, Simon
     
  8. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Hi, Simon.

    I'm glad you've got it working again. I notice that [order details subform]
    isn't quite the same name as orders_detail_subform, so perhaps this is just
    a typo. As a rule of thumb, unless you really, really enjoy chasing bugs
    (and some of us need an engaging distraction or need to improve our
    troubleshooting skills), then avoid using illegal characters in, and
    Reserved words as, identifiers, because when you surround the identifier
    with brackets you take the chance that Jet or Access will misinterpret or
    misuse the identifier.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
    info.


    "SimonW" <SimonW@discussions.microsoft.com> wrote in message
    news:DC10250A-3337-4E64-A2A4-9CB4A1926A49@microsoft.com...
    > Hi
    > Sorry for the delay in getting back to you, I had to go to the office of
    > the
    > people I'm doing this job for becasue they have Access 10, I'm developing
    > it
    > on Access9. It's 9 miles away in Penzance England
    >
    > Anyway, I went through your suggestions carefully but still got the crash.
    > However, you got me thinking and I isolated each subform and worked on its
    > code. I discovered that the corrupted code was in the first subform
    > (orders)
    > OnCurrent event, where I am requerying the nested (Order Details) subform
    > to
    > display the details of the selected order.
    >
    > This seemed to be an incorrect statement
    > Me.Parent![order details subform].Requery
    >
    > so I refined it with. The list of properties and constants wasn't much
    > help.
    > Form_orders.orders_detail_subform.Requery
    >
    > So there we are, many thanks, I needed that 2nd head ...
    >
    > Best wishes, Simon
    >
    >
    > "'69 Camaro" wrote:
    >
    >> Hi, Simon.
    >>
    >> > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    >> > excuse!

    >>
    >> I'm nearly blind, I have rheumatoid arthritis so bad I can hardly move my
    >> joints much of the time, and I've injured one hand badly enough that I've
    >> been typing one-handed and using the mouse a lot more than I used to --
    >> so
    >> much that I've worn out the clicker in one mouse and I see signs of this
    >> happening on another mouse that's less than a year old. My hair is much
    >> thinner as a result of side effects of some medications, but at least I
    >> have
    >> some of it left. But I sympathize with your having teenagers. Teenagers
    >> can
    >> drive you nuts.
    >>
    >> > Honestly, I did compile.

    >>
    >> On the Access 2002 computer? It has different versions of libraries and
    >> possibly different library paths to the default libraries than your own
    >> computer's configuration has.
    >>
    >> > I cannot see any other issue here other that corruption. Do you agree ?

    >>
    >> It's possible that the main form is corrupt. First, make a copy of your
    >> database file. Work only with this file copy for the next steps, so that
    >> if
    >> anything goes wrong, you still have the original.
    >>
    >> Copy the code in the main form's module into a text file. Next, import
    >> the
    >> main form into a brand new database. In the brand new database, remove
    >> the
    >> code behind the form and save the form, then compact the new database.
    >> Open
    >> the form's module in the brand new database and paste the code from the
    >> text
    >> file into the module, then save and compile. Compact the brand new
    >> database
    >> and close it.
    >>
    >> Delete the original main form in the database copy and compact the
    >> database.
    >> Import the main form from the brand new database. Compile the code and
    >> see
    >> if the main form works as it should. If not, try opening the database
    >> copy
    >> with the /decompile switch, then recompile the code and see whether the
    >> main
    >> form works as it should.
    >>
    >> If you need help with the /decompile switch, please post back.
    >>
    >> HTH.
    >> Gunny
    >>
    >> See http://www.QBuilt.com for all your database needs.
    >> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    >> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
    >> info.
    >>
    >>
    >> "SimonW" wrote:
    >>
    >> > Hi, thanks for the ticking off, I know I needed it...
    >> >
    >> > Hey, I've got 2 hell raising teenage daughters and no hair, what's your
    >> > excuse!
    >> >
    >> > Honestly, I did compile. The code is quite sweet. I commented out
    >> > OnCurrent() in case RecordsetClone.RecordCount = 0 was a problem - it
    >> > wasn't.
    >> >
    >> > My references are, in order
    >> >
    >> > Visual Basic For Applications
    >> > Microsoft Access 9.0 Object Library
    >> > OLE Automation
    >> > Microsoft DAO 3.6 Object Library
    >> >
    >> > OnNotInList() uses Dim db As Database which requires DAO 3.6, that's
    >> > why I
    >> > had to add it.
    >> >
    >> > I cannot see any other issue here other that corruption. Do you agree ?
    >> >
    >> > TIA, Simon
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> > "'69 Camaro" wrote:
    >> >
    >> > > Hi, Simon.
    >> > >
    >> > > > I had to add DAO 3.6 along
    >> > > > the way because of a Microsoft script I've used (probably
    >> > > > GetUserName())
    >> > >
    >> > > That's not good enough. Once you've added a library that contains
    >> > > classes
    >> > > of the same name as other libraries, the Access compiler will assume
    >> > > the code
    >> > > is using the first class name encountered in the libraries on the
    >> > > list of
    >> > > References, unless you explicitly indicate which library to use.
    >> > > That means
    >> > > the library that shows up higher in the list will have precedence
    >> > > over those
    >> > > libraries lower in the list.
    >> > >
    >> > > Either you can hope that other computers that this application is
    >> > > deployed
    >> > > on have the same libraries as your computer does (in the same paths),
    >> > > and in
    >> > > the same order of precedence, or you can explicitly declare
    >> > > variables. For
    >> > > example, the Recordset object is a common class object in both the
    >> > > DAO and
    >> > > ADO libraries, but Access 2000 and 2002 use the ADO library be
    >> > > default,
    >> > > without the DAO library. Therefore, when both the DAO and ADO
    >> > > libraries are
    >> > > Referenced, the following declaration needs to be used if the DAO
    >> > > library is
    >> > > needed:
    >> > >
    >> > > Dim recSet As DAO.Recordset
    >> > >
    >> > > . . . and the following declaration needs to be used if the ADO
    >> > > library is
    >> > > needed:
    >> > >
    >> > > Dim recSet As ADODB.Recordset
    >> > >
    >> > > For more information on the use of these two libraries, please see
    >> > > the link
    >> > > to Tom Wickerath's article, "ADO and DAO Library References in Access
    >> > > Databases" on the following Web page:
    >> > >
    >> > > http://www.Access.QBuilt.com/html/articles.html
    >> > >
    >> > > > Problem: When I take the file to the customer who has Access 2002,
    >> > > > it
    >> > > > crashes when the main form is navigated.
    >> > >
    >> > > Did you compile the code first before running the application? It
    >> > > probably
    >> > > has compile errors that you need to resolve before it will run
    >> > > correctly on a
    >> > > computer with a different version of Access and a different
    >> > > configuration
    >> > > (i.e., different paths for the library files).
    >> > >
    >> > > HTH.
    >> > > Gunny
    >> > >
    >> > > See http://www.QBuilt.com for all your database needs.
    >> > > See http://www.Access.QBuilt.com for Microsoft Access tips and
    >> > > tutorials.
    >> > > http://www.Access.QBuilt.com/html/expert_contributors2.html for
    >> > > contact info.
    >> > >
    >> > >
    >> > > "SimonW" wrote:
    >> > >
    >> > > > Helllo
    >> > > > I've developed a simple mainform with two nested subforms i.e.
    >> > > > customers,
    >> > > > orders, order details. I have used Access 2000, Jet 4.0.8618.0 Win
    >> > > > Xp SP2
    >> > > > and a fully up to date office 2k installation. I had to add DAO
    >> > > > 3.6 along
    >> > > > the way because of a Microsoft script I've used (probably
    >> > > > GetUserName())
    >> > > >
    >> > > > Problem: When I take the file to the customer who has Access 2002,
    >> > > > it
    >> > > > crashes when the main form is navigated.
    >> > > >
    >> > > > I've tried converting, emptying tables and compacting, no joy...
    >> > > >
    >> > > > Any ideas, anyone - please
    >> > > >
    >> > > > TIA, Simon
     

Share This Page