• Conversion problems (Access XP)

    Author
    Topic
    #367601

    Has anyone got any suggestions as to what is going on in this scenario

    I’ve got a wizard that builds a ‘standard’ interface in Access 97. Main form with tab on it, some of the tab pages have subforms on with data parameter fields (dates, codes, officers, etc.)
    Conversion to Access 2000 has worked fine for the last year or more. The new version in 2000 opens fine.
    Now came to do the same with XP and the conversion runs without any warnings, main form opens, can select tabs, BUT the fields on the subform can’t be selected, data altered, whatever

    Just what changed in XP from 2000 and 97 that can explain this behaviour ??

    Viewing 0 reply threads
    Author
    Replies
    • #573674

      Is the database built in Access 2000 or 2002 format?

      • #574330

        Charlotte,

        the original file was in Access 97 format, and I converted it to Access 2002 format. I’ve just tried converting to 2000 format using 2002, and get the same effect frown
        Ah, I remember putting a dummy field on the sub-form with an event on its GotFocus to do some checking – well remove it and the fields are again live, so it looks like it’s something different about the way 2002 handles the event, compared to 2000 and 97 help

        • #574556

          So is your problem solved, or do you still need help with something? Access XP is based on VB6, just like Access 2000, so the event model shouldn’t be any different. Perhaps if you post the code that is giving you problems, someone can spot the difficulty.

          • #574621

            The problem isn’t solved frown
            I still need to work out which the dummy control’s GotFocus is blocking selection of any of the other controls in the sub-form in XP, but it works in 97 and 2000
            I suppose I really need to clean up the way I manage the form and sub-form focus. My dummy control was a “quick & dirty” means to always ensure the focus was pushed back to the main form, as I was enabling/disabling various controls on the sub-form

            Sub DummyCtl_GotFocus()
            ‘ Builder version 1.4.3
            ‘ Auto-created by Admin on 26/02/2002
            ‘ Force the focus back to the main form

            Forms![frmMainMenu]!tabItems.Pages(“Page3″).SetFocus
            ” [3] main form name
            ” [4] page name

            End Sub

            • #574669

              What are the additional lines [3] and [4] for?

              All you need on the subform is

              Me.Parent!TabItems.Pages(“Page3”).setfocus

              Or you can replace “Page3” with the numeric index for that page. That should automatically set the focus to the first control on that tab page.

              This assumes that the tab control is actually on the parent form and not on another subform. It also assumes that the tab page in question is the currently visible tab page on the parent. If it isn’t, then you’ll need to make that page visible as well, which can be done several ways.

            • #574898

              The [3] and [4] are reminders for me in the source code used to create the events
              – I use some code based on example in the ADH which replaces the [1] [2] [3] etc. with specific values, e.g. the builder version is [1]
              In this case the main form name, frmMainMenu, replaces the [3]

              Thanks for the suggestion of the Me.Parent
              – the tab is on the parent, and the tab page should always be the visible one
              I’m still puzzled as to why the problem occurs in XP, but not in 2000 or the original 97 scratch
              – I put the dummy control on the subform as a way to get the focus back to the main form, so uses selects and enters a new value, then can tab back to the main form. In XP, the dummy control event seems to be always happening first, so the data entry controls can never get the focus hairout

            • #575079

              I would check the tab order for the detail section of the subform and make sure that the dummy control comes after the last data control in tab order. Otherwise, I can’t see any reason why this should occur. Is it possible you have something happening in the OnEnter event of the subform control that is triggering the behavior?

            • #575342

              Charlotte,
              I’ve checked the XP and original 97 version. Both have got the same tab order, the Dummy control first, then the user data field controls
              Also checked the events, the subform only has the one GotFocus on the dummy, the main form has various Click events on the command button controls, plus an initialise on the Form_Open
              By default the user controls are all disabled, only the dummy is enabled.
              Selection of a report from a list box on the main form enables any of the data fields which are applicable to that report, but even setting the dummys tab order to last, the user controls are still not selectable, so I presume the dummys GotFocus is still firing first scratch

              Thanks for all the responses, much appreciated, especially as this difference in XP has sure got me baffled brickwall

            • #575392

              If the dummy control is first in the tab order, you should have seen this behavior in all versions, not just XP. If it is the only control enabled on the subform, then it will receive the focus automtically whenever the focus shifts to the subform. From the way you describe it, the XP version is behaving exactly the way I would expect any version to behave, not just XP.

              I suspect there is more to this than what you have described. Why don’t you post a database with nothing but the form and subform, plus any underlying queries and tables with dummy info in them so we can take a look and see exactly what’s happening. I would suggest you post either a 97 or 2000 version of it, since I don’t have XP installed on this machine yet due to its conflicts with 2000.

    Viewing 0 reply threads
    Reply To: Conversion problems (Access XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: