Results 1 to 12 of 12
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field tabbing problem (Access2K, Win2KPro)

    I have a Main form and a button to open a subform based on a selected record. I have things set up to place the focus on the text field "Discharge Date" when opening the subform. Tabbing out and typing in info in the next text field works as expected, but when you tab out of that field the focus jumps up to the "Discharge Date" text field. Tabbing out of any field anywhere on the form jumps back to "Discharge Date".

    I have tried to rearrange the tab order and set Discharge Date to Tab Stop = No but nothing seems to make much difference. If I remove the form filter than automatically occurs when you click the button to switch to the Discharge subform this tabbling weirdness goes away. I used the canned Access macro code behind the button to pull up the form. Currently I have instructed the user to remove the filter when this happens (the behaviour is only somewhat consistent), and that does 'fix' it, but I'm not satisfied with this arrangement.

    Any suggestions?

    TIA

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

    Re: Field tabbing problem (Access2K, Win2KPro)

    In Access terminology, a subform is a form placed as a control on a main form, it is not opened separately. Or does your "to open a subform" not mean what it says?

    Do you have On KeyDown code or something like that? Do you have an AutoKeys macro?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field tabbing problem (Access2K, Win2KPro)

    sorry about the nonstandard terminology <g>

    The db has a main form and a subform, Intake. You can click on a button labled 'Discharge' to open another form with summary information from the main form and the Discharge subform stuff. I did this with the Access button macro for Open a Form, and it filters the new form based on the selected ClientID. Fairly standard arrangement, I would guess.

    There are a couple of things about the subform that *might* have to do with the odd tabbing behaviour:

    1) The subform contains two calculation fields that output Months and Days from Intake to Discharge (the offending textbox is "DischargeDate".) This calculation only fires when you click the 'Calculate' button next to the textboxes down on the form for showing the date difference.

    2) I also have OnLoad and OnClose code to invoke some code to disable the mouse wheel.

    Like I said, when I remove the filter on the discharge the tabbing behaviour is as expected. <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>

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

    Re: Field tabbing problem (Access2K, Win2KPro)

    What happens if you comment out the code to disable the mouse wheel?

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field tabbing problem (Access2K, Win2KPro)

    If i remove the OnLoad and OnClose events the tabbing behavious doesn't change. I use the same code in the other subform (Intake) and I don't have any problems.

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

    Re: Field tabbing problem (Access2K, Win2KPro)

    I don't think it is possible to get behind this without seeing the database.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field tabbing problem (Access2K, Win2KPro)

    Ok, here is a miniature of the project. Click on Discharge, type in something in the Discharge date, tab out and type in the Grade box, tab out...

    Converted to 97 to make it zip small.
    Attached Files Attached Files

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

    Re: Field tabbing problem (Access2K, Win2KPro)

    Apparently, the problem hasn't survived the conversion from Access 2000 to Access 97 to Access 2002. I can tab through the controls without problem.

    By the way, dod you know that Stephen Lebans has an easier-to-use Mousehook.dll now? You only need to place the DLL in the same folder as the database (no need to register it), and copy one module into your database. See MouseWheelOnOff.

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field tabbing problem (Access2K, Win2KPro)

    grrrr... *I* still get the behaviour when opening the 97 file in 2000 and don't convert it. And when I convert it to 2000! Perhaps you didn't do what is needed to get the behaviour to occur?

    1) Open it, and the Intake Form should auto-open.
    2) Click on the Discharge Client button (doesn't seem to matter if you select something or not)
    3) Focus should be set on the Discharge Date. Tab over to Grade. If there's already something in there, TYPE IN SOMETHING ELSE. Otherwise, the tabbing behavior doesn't show. You can tab into the next, unlabled textbox and you have to type something for the weirdness to start up. You need to actually change the content of a field for the tab to switch back to the DischargeDate textbox.

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

    Re: Field tabbing problem (Access2K, Win2KPro)

    Sorry, I hadn't typed anything. I do get the same behavior now. But I don't understand your design. Why do you use multiple tables if they have a one-to-one relationship, and why do you use subforms if there can only be one record in the subform?

  11. #11
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Field tabbing problem (Access2K, Win2KPro)

    The problem is that the main form (DischargeForm) & subform are linked on a calculated field on main form (which makes no sense - all of the fields on main form are calculated fields, looking up values from Intake form - yet main form is bound to a RecordSource?). If you change the IntakeID field ControlSource so it is bound to the IntakeID field in source table, you won't see the odd behavior. Also try opening Discharge form from Intake form when on new record and then enter data in Grade field, then tab - you get error because it's trying to save record (?) Recommend get rid of the Discharge subform and move the fields from subform to main form and apply filter when opening form

    HTH

  12. #12
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field tabbing problem (Access2K, Win2KPro)

    I know the db design seems a bit retarded, but I had a reason (I swear!) for setting up the Discharge main form text boxes to be display calculated info from the Intake main form: I wanted to simply re-display the information and didn't like the way the text looks when Disabled. So, rather than directly displaying the info (which will, as you point out, be the correct info for the discharge data) I decided to re-load the info with a calculation in order to: 1) Give the text a more readable format and 2) prevent the user from changing the info while in the Discharge form. However, I removed the calculations and re-mapped the textboxes to the values they would normally directly display and the tabbing behaviour goes away.

    I don't understand this sentence:

    <font face="Georgia">If you change the IntakeID field ControlSource so it is bound to the IntakeID field in source table, you won't see the odd behavior.</font face=georgia>

    If I select a client in the Drop-down box, the appropriate info for that client name/ID shows in the Intake subform. The appropriate information also appears when clicking on the button to go to discharge. The db seems to be behaving as intended.

    As to the recommendation to get rid of the subforms altogether, the reason they are separate is that the source data for the client info is in one table (ClientInformation) and the Intake is one another table (IntakeForm) and the Discharge stuff is on yet another table (DischargeForm) -- so the forms reflect the underlying table design. I separate Client info from Intake or Discharge as Client Info is common to both and Intake/Discharge are not identical, in an attempt to abstract the data during initial design. I've gone way too far to make any basic design changes (scads of queries supporting charts/graphs that reference the tables) so no I ain't gonna change the table design.

    The biggest weakness in the db's UI is that there can only be one Intake and Discharge per client. I have attempted to prevent duplication by implenting the MouseWheel code to prevent the user from accidentally making a second record and have set each subform to Cycle within Record and Single Form view and removing the record navigation in the subform. These things do help a lot.

    Well, having said all that, this is what happens: when I replace the calculated fields in the Discharge Main form with the actual fields from the table, the tabbing behaviour goes away. Simple enough!

Posting Permissions

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