Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Code ok only on one pc (A2000 (SR1))

    I am still having probs with this code.
    Its ok one one pc but won't work on another.
    DAO3.6 is present on both, in fact the ref's are the same.

    Any idea's

    Private Sub Command1_Click()

    Dim db As DAO.Database
    Dim RST As DAO.Recordset
    Dim strFilter As String
    Dim strSQL As String
    Dim strValue As String
    Set db = CurrentDb
    strFilter = "tblDriverSchedule.EstimateNo = " & Forms!frmDetails!EstimateNo & " And tblDriverSchedule.Supp = " & Forms!frmDetails!Supp
    strSQL = "Select * From tblDriverSchedule Where " & strFilter
    Set RST = db.OpenRecordset(strSQL, dbOpenDynaset)
    If RST.RecordCount = 0 Then
    DoCmd.OpenForm "frmDRIVERSCHEDULE"
    DoCmd.GoToRecord acDataForm, "frmDRIVERSCHEDULE", acNewRec
    Forms!frmDRIVERSCHEDULE!EstimateNo.SetFocus
    Forms!frmDRIVERSCHEDULE!EstimateNo = Forms!frmDetails!EstimateNo
    Forms!frmDRIVERSCHEDULE!Supp = Forms!frmDetails!Supp
    Else
    DoCmd.OpenForm "frmDRIVERSCHEDULE", acViewNormal, , strFilter
    End If
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    (1) If you try to compile the code on the problem PC, do you get an error message? If so, what is the error message and what is the offending instruction?

    (2) If the error occurs in runtime (on the problem PC), what is the error message and what is the offending instruction? Note: you may have to open the database with the Shift key down to be able to see code when an error occurs.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    My <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Have both pc's SR1 installed ?
    Francois

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Does the PC that the code work on have Jet 4.0 SP6 installed?

    I found that when I develop a DB on a PC with Jet 4.0 SP6 installed, some code will not work on a PC without SP6
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Code ok only on one pc (A2000 (SR1))

    That's been the case as long as I can recall. I saw weird behavior of subforms on a PC once while the same database, run from the network, worked perfectly on my workstation. Turned out to be a Jet SP issue. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  6. #6
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Hello all
    Sorry I've not replied sooner, just got back from my hols.
    More to the solution.
    How do I find out what version of jet I have installed?

    Thanks
    Dave

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    In Access, select Help/About..., and click the System Info... button.

    In the left pane, select Active Modules. Browse the list in the right hand pane for MsJet40. Look at the version.
    Jet 4.0 SP3 has version 4.00.2927.4 (if your version is lower, you have the original edition)
    Jet 4.0 SP4 has version 4.0.3714.7
    Jet 4.0 SP5 has version 4.0.4431.1
    Jet 4.0 SP6 has version 4.0.6218.0

    See ACC2000: Updated Version of Microsoft Jet 4.0 Available in Download Center for more information.

  8. #8
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Thanks for prompt reply hans, I'll check the other pc's later.

    Dave

  9. #9
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    HMMmmmmmmmmmmm

    This has cropped up again, I never really solved the problem.
    Just doing a search on microsot but, any other ideas would help.
    My Jet version just says : Jet 4.0

    Regards
    Dave

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Did you look up the version using Help/Info..., System Info..., as I suggested in my previous reply? See attached screenshot. If so, and if the version really says 4.0, you have NO service packs installed, and you should use the link in my previous reply; it contains links to download SP3 and SP6 (you must install SP3 before you can install SP6).
    Attached Images Attached Images
    • File Type: gif x.gif (2.1 KB, 0 views)

  11. #11
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Hans
    It seems I do have the same jet version, on further investigation it looks like the Dat & Time picker is causing the problem.
    I'll let you know what happens.
    Thanks
    Dave

  12. #12
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    From your link I notice that you have to install MDAC 2.6 before installing SP3. How do I know if I have MDAC 2.6 installed?
    Pat

  13. #13
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Well I solved the problem.
    Error 2501 is always one of those errors which takes time to resolve and crops up at the most un-opertune moments.
    In my case, I use the Msoft Date&Time picker, MScomct2.ocx.
    After reinstalling this, My forms load ok.
    Thanks all
    Dave

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Pat,

    Chances are you already have a recent version of the Microsoft Data Access Components (MDAC) installed, but if you want to check, you can download the Component Checker tool.

  15. #15
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Code ok only on one pc (A2000 (SR1))

    Hi Hans,
    Thanks for that info. It seems as though I have MDAC 2.1 SP2 ......Does this mean I will have to install all the MDAC 2.'s before installing SP3 - SP6?
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

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
  •