• How does MS get the header format in its samples

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How does MS get the header format in its samples

    Author
    Topic
    #468619

    Dear Loungers,

    I have only justs started using the 2007 version of Access, late I know! Anyway, to see the differences I decided to download some of the the samples proidd by Microsoft. I am curious to find out how they have achieved a number of formatting things. The Issues sample database will show all the effects I am asking about (found here):[/url]

      [*]The Form Header in, for example, the Issues Detail Form had a top part which shows a colour graduation and the lower part of the header has a row of action buttons which appear to be on a slightly darker bar.[*]I don’t understand how the colour graduation has been achieved since I can’t see anything specified, and it only appears above the “button bar” and not below (if I make the header to be larger).[*]With the “button bar”, if I click on the bar behind the buttons in the header there seems to be nothing to select, so how is the bar effect achieved?

    [*]The buttons on the button bar seem to have the button itself, in the form header area, for example cmdSaveandNew, and a corresponding control in the form body, for example cmdSaveandNew_LayoutLabel, these are linked but I can’t workout what the label is for? I think it is just a label created for the button control – the the same way a control for a data item creates a label. But why is it in the form body? and why has it been left there, does it serve any purpose? I can’y actually find a way to remove it without deleting the button itself.[*]The form has a picture associated with it called GlassBanner2.PNG, I can’t work out what this does and where it appears, and the file is not on my machine anywhere. Any ideas?[*]All the samples seem to use the Tag property extensively, except that I can’t find out where and how they are used. And, for exampe does anyone know what “;RegenerateCaption;” might do?[/list]
    I have searched for explanations on the net but to no avail so I hope someone out there can help.

    many thanks……………………….. liz

    Viewing 3 reply threads
    Author
    Replies
    • #1221728

      The Form Header in, for example, the Issues Detail Form had a top part which shows a colour graduation and the lower part of the header has a row of action buttons which appear to be on a slightly darker bar.[*]I don’t understand how the colour graduation has been achieved since I can’t see anything specified, and it only appears above the “button bar” and not below (if I make the header to be larger).[*]With the “button bar”, if I click on the bar behind the buttons in the header there seems to be nothing to select, so how is the bar effect achieved?

      [/list]This achieved using an image specified in the Picture property of the form. The picture is a thin strip across the top of the form. The Bar effect is below the bottom edge of the picture.

      The buttons on the button bar seem to have the button itself, in the form header area, for example cmdSaveandNew, and a corresponding control in the form body, for example cmdSaveandNew_LayoutLabel, these are linked but I can’t workout what the label is for? I think it is just a label created for the button control – the the same way a control for a data item creates a label. But why is it in the form body? and why has it been left there, does it serve any purpose? I can’y actually find a way to remove it without deleting the button itself.

      I can’t see any purpose for these labels at all. To Remove the labels, you need to remove the button and its label from the Layout. Select a button (and its label) in Design view, then using the ribbon, go to Arrange…Remove. Controls that are part of a Layout have lots of restrictions placed on how you use them, (but also some layout issues happen automatically) Once you have removed them from the Layout, you can delete the caption, or move the caption.

      The form has a picture associated with it called GlassBanner2.PNG, I can’t work out what this does and where it appears, and the file is not on my machine anywhere. Any ideas?

      See question 1. The picture is “embedded” which means it is not on your machine..it is embedded within the database.

      All the samples seem to use the Tag property extensively, except that I can’t find out where and how they are used. And, for exampe does anyone know what “;RegenerateCaption;” might do?

      I am sorry, but I have no idea what RegenerateCaption means. I can’t find any use being made of the Tags attached to controls. I wonder if they were used in the development of the example, but the developes forgot to remove them. If they still have a purpose, I would be very inerested in know what it is.

    • #1221729

      Dear John,

      Thank you for the help. I have managed to import one of the forms into another db and it brings the picture too although I can’t use it with any other form. Is the embedded picture acheived when the db is packaged? S,o when it was added I assume it was a picture defined in the header and then embedded during packaging?

      liz

      • #1221743

        I have managed to import one of the forms into another db and it brings the picture too although I can’t use it with any other form. Is the embedded picture acheived when the db is packaged? S,o when it was added I assume it was a picture defined in the header and then embedded during packaging?

        liz

        To add a picture to a form, you need to have the picture on your computer somewhere. It gets embedded the moment you add it, and specify Embedded as the Picture Type. Embedded pictures work on databases that have not been Packaged.
        So I don’t know of a way of reusing a picture that is embedded on a form, where you don’t have the file on your computer.All I can suggest is that you search for it, or make a screen capture of it.

        • #1222202

          Dear John,

          To add a picture to a form, you need to have the picture on your computer somewhere. It gets embedded the moment you add it, and specify Embedded as the Picture Type. Embedded pictures work on databases that have not been Packaged.
          So I don’t know of a way of reusing a picture that is embedded on a form, where you don’t have the file on your computer.All I can suggest is that you search for it, or make a screen capture of it.

          I have found a way to do this. This code isn’t parameterised which would be clever for the future but works for a one off:

          Sub Save_Form_Picture()

          ‘ This will export an embedded form picture and save as an external file so that it can be used

          Dim bPictureData() As Byte
          Dim SaveAsName As String
          Dim FileNumber As Integer

          ‘ Open the specific form, substitute FormName with the form you want to export from

          DoCmd.OpenForm “FormName”, acNormal, , , acFormEdit
          bPictureData = Forms!FormName.PictureData

          ‘ Write external file, substitute C:FolderFile.PNG for your own name, FreeFile picks the next available number

          SaveAsName = “C:FolderFile.PNG”
          FileNumber = FreeFile
          Open SaveAsName For Binary As FileNumber
          Put FileNumber, , bPictureData
          Close FileNumber
          End Sub

          I hope this helps others………………… liz

    • #1221750

      Liz,

      You can use PowerPoint to create a color gradation. Just create a blank slide then setup the background.

      [*] Right Click on the Slide
      [*] Select Background
      [*] Use the dropdown arrow below the “Background fill” section
      [*] Select Fill Effects…
      [*] Select the Gradient tab

      [/list]
      When you have the slide looking like you want save it as a .jpg file then import it into Access.
      [/font]
      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1222211

      That looks useful. Thanks for posting that.

    Viewing 3 reply threads
    Reply To: How does MS get the header format in its samples

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

    Your information: