Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conversion problems (Access XP)

    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 ??

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

    Re: Conversion problems (Access XP)

    Is the database built in Access 2000 or 2002 format?
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conversion problems (Access XP)

    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 <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    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 <img src=/S/help.gif border=0 alt=help width=23 height=15>

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

    Re: Conversion problems (Access XP)

    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.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conversion problems (Access XP)

    The problem isn't solved <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    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

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

    Re: Conversion problems (Access XP)

    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.
    Charlotte

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conversion problems (Access XP)

    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 <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>
    - 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 <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

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

    Re: Conversion problems (Access XP)

    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?
    Charlotte

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conversion problems (Access XP)

    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 <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    Thanks for all the responses, much appreciated, especially as this difference in XP has sure got me baffled <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

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

    Re: Conversion problems (Access XP)

    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.
    Charlotte

Posting Permissions

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