Introduction
Form background pictures are not only used for giving the Form a different look, but also for other useful purposes as well.
For example, if the user is keying in data from a pre-printed Document like a Telephone Bill or Electricity Bill etc.; it is a good idea to scan an image of this Document and use it as the Data Entry Form's background picture. The Data Fields can be positioned in appropriate locations on the image matching the physical Document so that it will be easier for the user to find information on the Document and key in exactly the same locations on the Form.
Microsoft Access Form Wizard has several images to use as a background picture, but I didn't find the one that I need; the one with a gradient background. So, I thought I would make one of my own and use it.
Creating a Sample Image
The steps that I have taken are given below to create the image for the Form Background picture.
- Opened a new Microsoft Word Document and went through the following steps to create a Gradient Bit Map Image:
- Selected Format - - >Background - - > Fill Effects.
- Under Colors, options selected One Color.
- Clicked on the Color 1 drop-down control and selected a light color.
- Used the Darker/Lighter slider control to adjust the color tone.
- Selected the Horizontal Radio Button under Shading Styles.
- Clicked on one of the Style Variants.
- Clicked OK to apply the selected shade as the Background of the Word Document.
- Maximized the Word Document Window.
- Push the Prt Scrn key (at the top row right side). The full-screen image is now captured and copied to Clipboard.
- Opened MS-Paint Program. You can find this in Start - - > Programs - - > Accessories.
- Displayed the Toolbox (View - ->Toolbox or press Ctrl+T).
- Selected the Select Tool (the one at the top right with a rectangle picture).
- Drawn a rectangle from the left top corner of the gradient image area to the right bottom corner to select the image large enough for my Form's width and height. If you find the width is not enough to cover your form then change the Page Orientation of the Word Document into Landscape before capturing it in MS Paint.
- Use Ctrl+C to copy the selected area into Clipboard.
- Clicked outside the selected area to deselect the earlier selection.
- Selected Clear Image from Image Menu (Ctrl+Shift+N) to clear the Canvas. Inspected the right Scroll Bar to check whether it is positioned at the top or not. It was positioned slightly down so I dragged it up to the top. Similarly adjusted the Scroll bar at the bottom to the position at the left end.
- Pressed Ctrl+V to paste the copied image from the Clipboard.
- Clicked outside the pasted image to de-select it.
- Dragged the Sizing control at the bottom of the Canvas up and stopped at the edge of the pasted image to eliminate the white area of the canvas.
- Similarly adjusted the right side of the image.
- Selected Save from File Menu to save the image at a convenient location with a name.
If you were with me so far then we will enter into the next stage of implementing the gradient image as a background picture. But, there are some limitations to using images like this one as a background picture, but we can overcome this with a little trick. If you are thinking about the increase in the size of the database then you are in the right direction. If you are considering the idea of saving the image in .jpeg or .GIF format; then you are far ahead of me. Saving the image in .GIF format in MS Paint will not give you a good quality image. If you have software like Adobe Photoshop then you can make better quality .GIF images.
We will do another trick to use the .bmp image itself to maintain the background image quality without affecting the database size.
But, first, let us see how to apply the gradient image as the Form's Background picture.
Inserting the Image on the Form Background
Before opening your database if you would like to check the present size of your database you may open Windows Explorer, check and note down the current size of the database. I suggest you better Compact the Database before you take its file size. You may check it again after the background picture is added to a Form to find the difference.
- Open your Database and open a Form in Design View or create a new one.
- Display the Property Sheet of the Form (View - -> Properties).
- Find the Picture Property and click on it.
- Click on the build button (. . .) at the right side of the Property Sheet and click on it to browse to the location of the image you have saved and select the image.
- The next four Properties are used for formatting and displaying the Background Picture.
- Picture Type
- Picture Size Mode
- Picture Alignment
- Picture Tiling
Linked or Embedded Image Methods
The Picture Type Property has two choices Embedded or Linked to select from and the default value is embedded. The embedded option is provided for invoking the default Image Editor Program from within MS-Access by double-clicking on the image and making changes to the image if needed. To facilitate this; the necessary image editor program invocation information is also stored along with the image in the database, resulting in a substantial increase of the database size for each image you add this way on your Form or Report. But, the background image inserted this way cannot be edited by double-clicking on the background as we do on the inserted image as an OLE object, on the Form.
A better choice is the Linked option which will keep the image outside and the database size is not affected. In either case, the image should go along with your database in the same location as the image wherever you take your database.
The Picture Size Mode has three options Clip (default) displays the picture in actual size wherever you position it by setting one of the Picture Alignment property Values (Top Left, Top Right, Bottom Right, Bottom Left, Center, and Form Center). The Center option will position the image vertically and horizontally centered on the Form and the Form Center option will position the image vertically centered on the left side.
The Stretch/Zoom/Tile Picture Methods
The Stretch Picture Size Mode option will stretch the image to fit the dimension of the Form and result in distortion of the image if it is a picture of something.
The Zoom Picture Size Mode option will attempt to maintain the right proportions of the image when stretched to match the dimensions of the Form. But both the Stretch and Zoom options will show stretch marks when the Form is restored to its original size. This is very much evident when a .jpeg or .GIF image is used.
The One Pixel Width Image
We can modify our earlier .bmp file to a one-pixel width image and Tile it across the Form that will give a good quality gradient picture effect and the image size also will be small.
- Open the earlier saved .bmp image in MS Paint Program.
- Select Attributes. . . from Image Menu.
- Change the Width value to 1 and let the Height value remain without change.
- Check the Units selected is Pixels.
- Save the image with a different name.
- Change the name of the background image to the new image in the Picture property of the Form.
Caution: Do not attempt to use the Picture Size Mode property options Stretch or Zoom; MS-Access will hang up.
- Set the Picture Tiling Property Value to Yes and save the Form.
- Open the Form in Normal View and enjoy your creation.
I spent my Monday evening in geeky delight playing with these ideas.
ReplyDeleteVery nice example of efficient use of the tools at hand!
Two suggestions:
1) Choose one of the dark-light-dark or light-dark-light options in Word. This way, if you make good choices on sizing and selecting, you can get seamless tiling for big forms.
2) Use Paint attributes to downsize the canvas before copying the gradient image -- it will grow as needed, and this approach is much less aggravating than trying to manipulate sizing.
PE in CT
I find it easier to create the same effect by photoshopping the image before adding it to the form background. I was looking for info about using an animated gif in a form background. Is this possibile?
ReplyDeleteI lately found your blog/website and have really loved reading this and some of your other posts. I believed I would dive out from the shadows and leave my very first comment. I'm not certain what to say other than I have enjoyed reading through and will continue to visit as frequently as I can.
ReplyDeleteConveyancing Solicitors...
ReplyDelete[...]while the sites we link to below are completely unrelated to ours, we think they are worth a read, so have a look[...]...
Download Movies...
ReplyDelete[...]below you'll find the link to some sites that we think you should visit[...]...
Full Movie Downloads...
ReplyDelete[...]here are some links to sites that we link to because we think they are worth visiting[...]...
1.) Extra Reading...
ReplyDelete2.) [...]this site is off topic but I recommend taking a quick look at it[...]...
Evil eye pendant...
ReplyDeleteI saw this site and linked to it! Toataly recomended!...
1.) What do you think...
ReplyDelete2.) [...]it would be cool if you took a look at this site. It has some good information on it[......]...
Blogging Internet...
ReplyDelete[...]we like to honor other sites on the web, even if they aren't related to us, by linking to them. Below are some sites worth checking out[...]...
OpenOffice Download...
ReplyDelete[...]listed below are several links to internet pages I always link to because we believe they really are worthy of browsing[...]...
Flash Website Builder It's An Incredible Posting Congratulations...
ReplyDeleteTerrific story, reckoned I wish to track-back on it. FYI did you heard the news about the tsunami now has a lot more difficulties too :)...
nissan juke review...
ReplyDeleteAwesome post, I've linked back to your blog here http://www.vwsuv.net/sites-we-like/ return the favor if you can, thanks!...