Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    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):

    1. 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.
      1. 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).
      2. 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?
    2. 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.
    3. 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?
    4. 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 have searched for explanations on the net but to no avail so I hope someone out there can help.

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

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Quote Originally Posted by lizat View Post
    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.
    1. 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).
    2. 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?
    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.
    [attachment=88696:Picture.gif]
    Quote Originally Posted by lizat View Post
    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.

    Quote Originally Posted by lizat View Post
    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.

    Quote Originally Posted by lizat View Post
    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.
    Attached Images Attached Images
    Regards
    John



  3. #3
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    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

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Quote Originally Posted by lizat View Post
    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.
    Regards
    John



  5. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    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

    When you have the slide looking like you want save it as a .jpg file then import it into Access.

    RG
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. #6
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Dear John,

    Quote Originally Posted by John Hutchison View Post
    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:\Folder\File.PNG for your own name, FreeFile picks the next available number
    '
    SaveAsName = "C:\Folder\File.PNG"
    FileNumber = FreeFile
    Open SaveAsName For Binary As FileNumber
    Put FileNumber, , bPictureData
    Close FileNumber
    End Sub

    I hope this helps others..................... liz

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    That looks useful. Thanks for posting that.
    Regards
    John



Posting Permissions

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