Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Blacktown, Sydney, New South Wales, Australia
    Posts
    175
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Templates (AC97;AC2K)

    I have had a large project dumped into my lap, which will require upwards to 30 forms. I would like the same style applied to each form. OK I hear you say! Use a template.
    I would like to.
    However, in the Page Header section (and possibly the Footer), I need to place some default controls. eg Company Logo, Text Box for Form Title, using a standard font etc.


    Is there a better way, other than creating a dummy form. Although this will work, it means that all the forms will need to be designed manually, because I can't figure a way to add the default controls, from a template or wizard.

    Any advice would be appreciated, even if it is to say, Nah!, use a dummy form and create forms manually.

    TIA

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

    Re: Templates (AC97;AC2K)

    You will have to take the dummy form approach unless you are skilled enough to build your own wizard to create the forms. Form templates hold the information about colors, fonts, etc., but they won't actually put controls into a new form based on the template. Sorry.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Blacktown, Sydney, New South Wales, Australia
    Posts
    175
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Templates (AC97;AC2K)

    Thanks Charlotte, guess I was afraid of that, but thought maybe one of the Board's Sages might come up with an answer, (Like 42 fer instance).

    Sigh, Now I'll have to spend some time planning the database. (Shudder!)

  4. #4
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Templates (AC97;AC2K)

    This may sound naive but once you have one form set up how you want, can you not just copy and paste the relevant controls? It shouldn't take too long to do.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

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

    Re: Templates (AC97;AC2K)

    OK, 42. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Now that you know the answer to life, the universe, and everything, how about a workaround? You can put the "standard" controls for the form header or footer onto a form that is just the size to contain them and then drop that form onto your new forms as a subform. Just remember that if any of these controls are buttons or used for searches, etc., you have to reference the parent form before taking the appropriate action. Does that help?

    And planning the database is exactly what you should spend time doing, so you get no sympathy from me! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

  6. #6
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Templates (AC97;AC2K)

    Take a look at Helen Feddema's stuff . Nos. 22 or 36 might be of help.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

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

    Re: Templates (AC97;AC2K)

    Don't know if this will help, if you're real lazy (like me) once you create your "template" form with default formatting, controls, etc, you can use sub like this to "automatically" create new form based on "template" & open same in design mode:
    <pre>Public Sub CreateNewFormTemplate()

    'Create new form by creating copy of template form ("frmTemplate")
    Dim strNewForm As String
    strNewForm = InputBox("Enter name of new form:", "NEW FORM TEMPLATE")
    If Len(strNewForm) > 0 Then
    DoCmd.CopyObject , strNewForm, acForm, "frmTemplate"
    DoCmd.OpenForm strNewForm, acDesign
    Else
    MsgBox "Action cancelled.", vbCritical, "CANCELLED"
    End If

    End Sub</pre>


    HTH

  8. #8
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Blacktown, Sydney, New South Wales, Australia
    Posts
    175
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Templates (AC97;AC2K)

    Thanks to all who have offered advice. I will investigate.

    PLANNING. Charlotte, this is a soapbox subject for me that my workmates are tired of hearing. I have not heard of any tool to assist, so I have developed a 'Template' in MS Excel.
    Firstly I Identify what 'module' (Not to be confused with VBA', but referring to functionality), That I want in the database. I then list what tables are required for each module in Colomn A. (There is a separate sheet for the fields in each table.) I then list any forms and reports that I require. In column B I identify the data source for forms and reports. This then will tell me which queries I need. The advantage of using Excel, is that it has a 'New Discovery' range built in. .....wait for it.... Range(AH:HA).

    The current Database is into its third day of planning, and the Excel sheet prints out at approx 8 pages. Its crude, but it works for me.

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

    Re: Templates (AC97;AC2K)

    The only caution with that approach is that if you have added and removed controls from your "template" form, those deleted controls still count against the maximum controls that you can create on your new form.
    Charlotte

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

    Re: Templates (AC97;AC2K)

    Then I guess it'd be a good idea to create new template form from scratch once you have design figured out so you don't use up your "quota". I'd ask what the limit is, but see that according to "Access Specifications" in Help there's a limit of 754 for "Number of controls and sections you can add over the lifetime of the form or report." Is there any way to determine total number of controls, including deleted ones, that counts towards your "quota," or do you just wait until you get an error msg when you try to add new control to form or report. I assume this number is saved internally somewhere. If you run code to count number of controls in form's Controls collection you get number of controls currently on form, deleted ones are not counted.

    If a new form needs over 700 controls it needs to be simplified anyway. I've yet to run into the 754 control limitation, even with complex forms, with lots of controls, that have been modified many times.

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

    Re: Templates (AC97;AC2K)

    I've seen it a few times, which is why I brought it up. It's not likely unless you're using forms like survey questionnaires that may have hundreds of questions using unbound controls (checkboxes, option groups, etc.), plus labels, buttons, subforms, pagebreaks, whatever. Try copying one of those, wiping out the individual questions and adding a whole new set a couple of times et voila, you have liftoff! <img src=/S/woops.gif border=0 alt=woops width=58 height=36>
    Charlotte

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

    Re: Templates (AC97;AC2K)

    In addition, according to MSKB Article 208192 (ACC2000: Errors Converting or Importing with 754 or More Controls), besides controls, the number of sections on form or report and the number of fields in the form/report's RecordSource also count towards the 754 maximum limit. The article recommends reducing the total number of controls, sections, or fields on form/report to less than 754 to fix wierd errors resulting from trying to import or convert such objects, but doesn't say anything about controls that have been deleted counting towards total limit.

    Anyway this was a good point to bring up on the subject of using "recycled" forms/reports as "templates", I'm sure a lot of Access users are unaware of this limitation - I'd heard of it before but did not even think of it in this case.

  13. #13
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Blacktown, Sydney, New South Wales, Australia
    Posts
    175
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Templates (AC97;AC2K)

    Thanks Charlotte for the tip. I was also not aware of this limitation. As always, you always walk the extra mile when offering assistance. On behalf of the thousands you have helped.

    T H A N K Y O U

Posting Permissions

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