• Tabbed vs MultiPage (Access 2003)

    Author
    Topic
    #431015

    I

    Viewing 5 reply threads
    Author
    Replies
    • #1007804

      What is the objection to using the Tab key?

    • #1007809

      If, as I suspect, it is not acceptable to use Tab instead of Page Down, you can try this:

      1) Set the Key Preview property of the form to Yes. This means that all keystrokes will be passed to the form’s event handlers before being passed to the active control’s event handlers.

      2) Create the following event procedure for the On Key Down event of the form:

      Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
      Select Case KeyCode
      ‘ Did the user press Page Down?
      Case vbKeyPageDown
      ‘ Adjust the treshold value as needed
      If Me.ActiveControl.Top > 10000 Then
      ‘ Change PageDown to Tab
      KeyCode = vbKeyTab
      End If
      End Select
      End Sub

      You will have to find a suitable value for the treshold (10000 in the code above) either by inspecting the value of the Top property of the last page break and converting it to twips (1 inch = 1440 twips) or by trial and error.

      • #1007813

        Hans,

        It’s not every day I get to measure something with a twip. The possibilities are endless. Pun intended.

        Seriously, thank you again for your near instantaneous help. Apparently sitting at my computer when we have guests for dinner is not considered to be the social thing to do. Especially if I want to wake up tomorrow morning. Which, by the way, will be the first chance I get to try this out.

        Thanks again,

      • #1007869

        Hans,

        Good Monday Morning to you!

        Your suggestion worked “right out of the box” with no adjustments needed. And here I was all excited about getting to play with my twips.

        Thanks again,

        • #1007871

          You could give the twips to your grandchildren… evilgrin

          • #1007914

            Hans,

            I may have heard them calling me a Twip on occasion, but not sure.

            Anyway, back at the multi-page form.

            As I mentioned in my previous post to you, your code worked on my screen perfectly

            • #1007921

              I can’t explain that. However, it won’t take very long to determine a value that works.

    • #1007833

      I use Tabbed pages a lot, and avoid this problem by not using Windows themed controls , and usually using Attached labels with text boxes.

      What is your objection to attached labels?

      If your objection only relates to the form building process, you could build the form with unattached lables, then when you have finished attach the labels to get rid of the flicker.

      To attach an unattached label: select label, Cut, select textbox, Paste. It will now be atached.

      • #1007873

        John, thanks for responding. I have no real objections to using attached labels other than the fact it was easier to just throw on and manipulate a text box. Needless to say with the

        • #1007878

          But when you just “throw on a text box”, don’t you get an attached label automatically? I always do.

          Do you know that if you click any tool in the toolbox, then look at the properties box, you are looking at the properties of any new control of that type.
          Amongst the many format properties of a the default text box is one “auto label”, which controls whether a label is created.

          I don’t like colons after labels, and for years I used to take them out, then I found out how to stop them being put there is the first place.

          • #1007989

            >>>I don’t like colons after labels, and for years I used to take them out, then I found out how to stop them being put there is the first place.<<<

            How do you do that?

            • #1007995

              Patt

              As I said in the previous post, if you click on a tool in the toolbox, then look at the properties box, you are looking at the properties of the default comtrols of that type.
              One of the properties of the default text box is :Add colon.

              There are lots of things in there that I used to find myself changing all the time after I created the controls, and now come out the way I want them.

              I think the changes you make apply only to the current form.

              added by John a but later
              But you can use the form as a template for new forms created with the form wizard, and these will then inherit all the changes you make. (but i can’t remember how to do this at the moment, and haven’t got time just now to try to find out how I did it.)

            • #1008014

              Thanks John

    • #1007835

      I once had to create a long form with 6 pages. I could only fit 5 downwards before I reached the maximum form length so page 6 had to be next to page 1 but offset to the right by a bit more than a screen width.

      To navigate around I had 6 command buttons. Each had a number on it to say what page it went to , and a keyboard shortcut set so that Alt & Number took you to that page.

      For pages 1 to 5 the event was just Me.GoToPage 4 etc

      For Page 6 it was Me.GoToPage 1, offset where offset was a constant that specified how many twips wide the screen was. The effect of this was to go back to page 1, then scroll to the right by a screen width.

    • #1007907

      We had a problem with having multiple tabbed pages from several queries loading slowly so we changed the entire form to use a series of command buttons that were arranged to look like tabs and when you clicked the command buttons it would just change the subform it was showing. This eliminated the problem of the form loading slowly and made a very neat single page form. Probably too much work for you to change now but I found the technique worked very well

      Carla

      • #1007915

        Hi Carla,

        Thanks for jumping in to help. I totally agree with your approach with respect to the buttons and the subforms. The trick right now is to attempt both yours and John

      • #1023403

        That sounds like you were loading all the subforms/queries that populated the separate tab pages when you opened the form. The usual workaround for that is to not load other pages until the tab is clicked. That significantly speeds up form loading, since it only has to populate the first tab.

        • #1023405

          Hi Charlotte,

          So you work weekends too! Thanks for the heads up on this problem. It is true that when I load this form I almost have time to go for coffee. It has 6 tabs and 12 subforms. Don’t ask, just consider it, as always, completely necessary and appropriate to the situation.

          That being said, your suggestion of only loading the specific subforms when I click the related tab sounds like an excellent idea. That’s the good news. The bad news is, never having taken that approach, mainly because I didn’t know how, I would truly appreciate your showing me the light and explaining to me exactly how I would do that. In that I have a few other obscenley-tabbed forms, this would be a good thing.

          Thanks again, not just for this, but all of your past suggestions,

          • #1023406

            Charlotte is not online at the moment. You should do the following:
            – Write down the Source Object property for each of the subforms on tab pages.
            – Clear the Source Object property for all subforms on tab pages, except for the first tab page (the one on the first tab will be visible when the form is loaded, so no point in loading it later)
            – Put code in the On Change event of the tab control. For example:

            Private Sub ctlTabs_Change()
            Select Case Me.ctlTabs
            Case 0 ‘ 1st tab
            ‘ no need to do anything
            Case 1 ‘ 2nd tab
            If Me.Subform2.SourceObject = “” Then
            Me.Subform2.SourceObject = “Subform2”
            End If
            Case 2 ‘ 3rd tab
            If Me.Subform3.SourceObject = “” Then
            Me.Subform3.SourceObject = “Subform3”
            End If
            Case 3 ‘ 4th tab

            End Select
            End Sub

            Of course, you must substitute the correct names.

            • #1023408

              Hans,

              Don’t ever believe them when they say old dogs can’t learn new tricks. Thanks kindly for jumping in to help me with my ongoing Access education,

    • #1023383

      As usual, a day late & a dollar short, but we just upgraded from Office 2K to Office 2003 at work, and while converting one of my Access front end databases to 2003, noticed for first time the same (very annoying) “screen flicker” – at first not sure of cause, but some testing soon revealed that “unattached” (“unassociated”) labels on tabbed forms were at fault. (These labels are used on form for explanatory text, etc.) To fix, as workaround created “dummy” locked, unenabled textboxes w/transparent borders, backcolor, etc to attach the labels to, w/the dummy textboxes positioned “underneath” label. This fixed problem in most cases though in few instances still observed some residual “flicker”. I never had this problem in earlier versions of Access. Another reason not to “upgrade” to 2003 unless you are a big fan of “XML integration” and so on. Not to mention, if you have a front end w/a lot of complex objects (forms, reports) in 2003 the app will crash at the drop of a hat – just look at it funny on the screen & it will crash on you, with that stupid MS “We regret the inconvenience” dialog box. The only reason I don’t stick with more stable 2000 file format is because in ACC 2003 you cannot “compile” 2000-format front end db as an .MDE.

      Could not find anything in MSKB that addresses this issue. Would like to know if MS has any intention to fix. My theory is, it has something to do with their great new “Error Checking” feature for “unassociated labels” — that’s the only thing that computes…

      I will admit, the Office 2003 UI looks nicer….

      Anyway was glad to locate this post so know it just wasn’t me who experienced the very annoying “flicker” phenomenon in 2003.

      • #1023388

        In my ‘limited’ testing of this, the screen flicker goes away when you turn off “use winodws themed controls” in Options..Forms/Reports.

        The problem also goes away if you revert to “Windows Classic” themes instead of using XP. As I much prefer the classic look, this flicker is never a problem for me.

        • #1023402

          Good Morning John!

          Interesting that the Case of the Flickering Tab Form has once more raised its

          • #1023435

            That is interesting!

            I can turn the flickering on and off with 100% reliability by switching between Classic and XP themes. And with the theme set to XP, turning on and off “use windows themed conrols” also seems pretty reliable. and I have tried this on a few computers.

            The downside of specifying the source object of the subforms in the change event of the tab control is that you cannot access the subforms in Design view. When you switch to Design view, they are empty. So I tend to leave doing that until the project is substantially finished, and I only do it if speed has become an issue.

            • #1023534

              John,

              Thanx for additional info — I tried suggestion to turn off the “Use Windows Themed Controls” setting but still got screen flicker if any “unassociated” labels on form. Not sure if this has any effect if not using Windows XP – at work we are still using Windows 2000 (SP4) — at home on XP systems I also use “Windows Classic” style – not a fan of default XP theme. Also not sure if this setting is per-user on a given machine, or per-database – the Access 2003 “Help” system is NOT an improvement over its undistinguished predecessors.

              To avoid the “screen flicker” issue in future plan to simply use locked, unbound textboxes in place of “unassociated” labels.

    Viewing 5 reply threads
    Reply To: Tabbed vs MultiPage (Access 2003)

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

    Your information: