Code not working in MS Access 2003 but works in 2000

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • justusb
    New Member
    • Aug 2007
    • 3

    Code not working in MS Access 2003 but works in 2000

    Hi Guys,


    I just have a query about the code below:

    Code:
    Private Sub Form_Current()
    
    On Error Resume Next
        Application.Echo False
        Forms!QueryBox!QueryBoxDiscrepancyRemarksSubForm.Requery
        Application.Echo True
    
    End Sub
    This code works in 2000 but not in 2003. I have created a Form that has two parts. The first part contains a summary of all the records found in the database. The second half of the form has the FULL REMARKS portion of that specified record. If I click on any of the summarized records in the first half, the second half will show the details.

    Why is this no longer working in 2003? Can anyone help?
    Thank you and warm regards to all....
    Last edited by JKing; Aug 28 '07, 01:40 PM. Reason: [CODE] Tags
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #2
    Referring to a subform in A2003 you normally have to refer to it with the .Form after the subform name...

    In other words, try this code:

    [CODE=vb]Private Sub Form_Current()

    On Error Resume Next
    Application.Ech o False
    Forms!QueryBox! QueryBoxDiscrep ancyRemarksSubF orm.Form.Requer y
    Application.Ech o True

    End Sub[/CODE]

    Regards,
    Scott

    Comment

    • justusb
      New Member
      • Aug 2007
      • 3

      #3
      Hi Scott,


      Thank you for the reply.
      I tried your suggestion but it has the same effect.

      In any case, I also tried using other PCs with MS Access 2003. In some PCs, the code actually works. However, majority of the PCs in my department cannot view the subform. In any case, this is not an MS Access incompatibility/version issue.

      Do you have any idea what else is missing? All of us have XP Professional 2003 as operating systems. All of us have MS Office 2003 as well but only a handful can actually see the REMARKS details in the subform

      Would appreciate a "get back". Thanks.

      Comment

      • Scott Price
        Recognized Expert Top Contributor
        • Jul 2007
        • 1384

        #4
        Originally posted by justusb
        Hi Scott,


        Thank you for the reply.
        I tried your suggestion but it has the same effect.

        In any case, I also tried using other PCs with MS Access 2003. In some PCs, the code actually works. However, majority of the PCs in my department cannot view the subform. In any case, this is not an MS Access incompatibility/version issue.

        Do you have any idea what else is missing? All of us have XP Professional 2003 as operating systems. All of us have MS Office 2003 as well but only a handful can actually see the REMARKS details in the subform

        Would appreciate a "get back". Thanks.
        The first thing would be to check your References for missing ones... in VBA editor window click Tools>Reference s. Compare those computers that work with those that do not for what references might be missing.

        Are you using any ActiveX controls on the subform?

        using the [SubformName].Form reference is not a version compatibility issue. It should be mandatory for both A2000 and A2003.

        Could you give me a little better idea of what you have on the form and subform? Controls, etc... A screenshot wouldn't be a bad idea either.

        Regards,
        Scott

        Comment

        • JConsulting
          Recognized Expert Contributor
          • Apr 2007
          • 603

          #5
          Originally posted by justusb
          Hi Guys,


          I just have a query about the code below:


          Private Sub Form_Current()

          On Error Resume Next
          Application.Ech o False
          Forms!QueryBox! QueryBoxDiscrep ancyRemarksSubF orm.Requery
          Application.Ech o True

          End Sub


          This code works in 2000 but not in 2003. I have created a Form that has two parts. The first part contains a summary of all the records found in the database. The second half of the form has the FULL REMARKS portion of that specified record. If I click on any of the summarized records in the first half, the second half will show the details.

          Why is this no longer working in 2003? Can anyone help?
          Thank you and warm regards to all....
          This method is rather confusing. If you are using a main/subform setup, there's no need to requery if you have your master/child links set up between them. Scott's right, we need more info.
          J

          Comment

          • justusb
            New Member
            • Aug 2007
            • 3

            #6
            Hi Guys,


            Thank you for the replies. I appreciate it.
            I tried everything including what you suggested to look for missing references. I also searched for clues in the Control Panel for any Windows hotfixes or SPs loaded or not loaded into the PCs. However, we are accessing the program from a server.

            I tried to attach an image in this but It seems like I am not allowed to.

            Anyway, you can look at the screenshots in this link: http://www.flickr.com/photos/justus1215

            Once again, thanks and warm regards.

            Comment

            • Scott Price
              Recognized Expert Top Contributor
              • Jul 2007
              • 1384

              #7
              Originally posted by justusb
              Hi Guys,


              Thank you for the replies. I appreciate it.
              I tried everything including what you suggested to look for missing references. I also searched for clues in the Control Panel for any Windows hotfixes or SPs loaded or not loaded into the PCs. However, we are accessing the program from a server.

              I tried to attach an image in this but It seems like I am not allowed to.

              Anyway, you can look at the screenshots in this link: http://www.flickr.com/photos/justus1215

              Once again, thanks and warm regards.
              Just had a look at your screenshots, thanks for posting them!

              The Remarks portion of your form is really not a subform, unless you've done some fancy formatting to make it look more like an ActiveX control. I suspect that what you really have is an ActiveX control on a tab control of your main form. With ActiveX you need to be very careful that each computer is using the same version of the ActiveX library in References. It's notorious for being very finicky that way!

              Take a careful look at which version of the library this was developed under, and then make sure each computer is using the same one. The reference I have for mine is Microsoft ActiveX Data Objects (Multi-dimensional) 2.8 Library. Note that there is also a Microsoft ActiveX Data Objects 2.8 Library that is not the same.

              Another one of the wonderful peculiarities that make us just love M$, eh?

              Regards,
              Scott

              Comment

              • puppydogbuddy
                Recognized Expert Top Contributor
                • May 2007
                • 1923

                #8
                Originally posted by justusb
                Hi Guys,


                Thank you for the replies. I appreciate it.
                I tried everything including what you suggested to look for missing references. I also searched for clues in the Control Panel for any Windows hotfixes or SPs loaded or not loaded into the PCs. However, we are accessing the program from a server.

                I tried to attach an image in this but It seems like I am not allowed to.

                Anyway, you can look at the screenshots in this link: http://www.flickr.com/photos/justus1215

                Once again, thanks and warm regards.
                See this link:


                It seems that "applicatio n" is one of the unsafe expressions in the new sandbox mode that become effective with Access 2003.

                Comment

                Working...