Microsoft Access (the Relational Database Management System), is the Jewell among Ms-Office Suite of Applications, comes with superior Designing Tools and with built-in Visual Basic Language. These Pages are not intended for Beginner’s Tutorial Lessons but for those who have at least some basic knowledge of Designing MS-Access Tables, Queries, Forms, Reports, Macros and have general understanding of Visual Basic (the Programming Language of all MS-Office Applications) Modules, Function Procedures, Event Procedures etc.
When we develop an Application under any Database Management System it should be User-friendly and visually pleasing too. An un-attractive design spoils the appeal of the whole Project and it reflects the developer’s lack of creativity and indirectly reflects his inability to approach data processing problems effectively as well.
You can cook good food in the Kitchen but if the final presentation on the Table is bad then all the efforts put behind the scene doesn’t get the attention that it deserves.Like the saying goes, “face is the mirror of mind”, attractively designed Screens and Reports definitely have an appeal to the Users.
Here, I would like to present some of the Controls and Programs that I have developed to use in my Projects and I am sure that you will find them interesting too.
Example Codes are written for MS-Access 2000 and will run under later versions too.
First, ensure that the essential Reference Library Files are attached to your Project. Display the Visual Basic Editor Window. Select Visual Basic Editor Option from Tools Menu or Code from View Menu.
On the Visual Basic Editor Window Select References… from Tools Menu. Put check mark on the following Library Files in the Available References Dialogue Control:
- Visual Basic for Applications
- Microsoft Access 11.0 Object Library
- OLE Automation
- Microsoft DAO 3.6 Object Library
- Microsoft ActiveX Data Objects 2.5 Library
- Microsoft Office 11.0 Object Library
- Microsoft Visual Basic for Applications Extensibility 5.3
The Version Numbers of Library Files will be different based on what MS-Office version you are using. The Library File’s List will be in alphabetical order. After you put check marks all the selected items will appear in the list on the top.
When the Mouse is passed over the Command Button it will move up a little to the left showing up its shadow underneath and when Mouse is moved over the blank area of the Form the Command Button goes back into its original state. When this action is repeated the Button gives a lively appearance responding to the User’s mouse movements over it.
Copy and paste the following Code into a New Global Module:
Public Function ButtonAnimate(ByVal strForm As String,ByVal mode As Integer, ByVal lblName As String) '------------------------------------------------------------ 'Command Button Animation 'Author : a.p.r. pillai 'Date : September 2006 '------------------------------------------------------------ Dim FRM As Form, l As Long, t As Long On Error GoTo ButtonAnimate_Err Set FRM = Forms(strForm) l = FRM.Controls(lblName & "Box").Left t = FRM.Controls(lblName & "Box").Top If (mode = 1) And (FRM.Controls(lblName & "Box").Visible = False) Then FRM.Controls(lblName & "Box").Visible = True FRM.Controls(lblName).Left = l - (0.0208 * 1440)' 0.0208 inches FRM.Controls(lblName).Top = t - (0.0208 * 1440)' 0.0208 inches FRM.Controls(lblName).FontWeight = 700 ElseIf (mode = 0) And (FRM.Controls(lblName & "Box").Visible = True) Then FRM.Controls(lblName & "Box").Visible = False FRM.Controls(lblName).Left = l FRM.Controls(lblName).Top = t FRM.Controls(lblName).FontWeight = 400 End If ButtonAnimate_Exit: Exit Function ButtonAnimate_Err: Err.Clear Resume ButtonAnimate_Exit End Function
NB:All object specifications in this site are in U.S. measurements.
Those who follow Metric System please convert the values or change the Regional Settings into U.S. on Control Panel.
Command Button Design:
- Create a Command Button on the Footer Section of a Form
- Display the Property Sheet of the Command Button and change the following Properties:
- Create a Rectangle Control on the Footer of the Form slightly smaller by Height and Width of the Command Button so that when the Command Button is placed over the Rectangle Control it completely hides it.
- Change the following properties of the Rectangle Control:
- Drag the Rectangle control correctly underneath the Command Button. You can use Ctrl-Key with Arrow Buttons in MS-Access 2000 or Arrow Keys in later Versions to move the Control precisely under the Command Button.
- Copy and paste the following Code into the Form’s Visual Basic Module and save the Form.
- Open the Form in Normal View and try moving the Mouse over the Command Button and over the blank area of the Form Footer in a continuous stroke.
Name = cmdClose Caption = Close ControlTipText = Click
Name = cmdCloseBox
Note : The Rectangle Control’s Name must be exactly the same Name of the Command Button with the ‘Box’ suffix.
Visible = False SpecialEffect = Shadowed BorderColor = 0 BorderStyle = Solid BackStyle = Transparent
The Rectangle control will not be visible when correctly placed underneath the Command Button. If necessary, click the Send-to-Back Toolbar Button (or Select Send-to-Back from the Format Menu) if the Rectangle Control is overlapping the Command Button.
Private Sub cmdClose_MouseMove(Button as Integer, Shift as Integer, X as Single, Y as single) ButtonAnimate Me.Name, 1, "cmdClose" End Sub Private Sub FormFooter_MouseMove(Button as Integer, Shift As Integer, X As Single, Y As Single) ButtonAnimate Me.Name, 0, "cmdClose" End Sub
When the Mouse is over the Button the Button moves slightly up and to the left showing up the Rectangle Frame as if it is the shadow of the Command Button and when the Mouse is dragged over the blank area of the Form Footer the Button goes back to its original state hiding the shadow. When this action is repeated the Button becomes lively and responds to the User every time the mouse is passed over the Button.
Any Number of Command Buttons can be added this way at the Form Footer (or Form Header Section, Detail Section) by placing the code for MouseMove Events. When the ButtonAnimate() Function is called, the Function Parameter Value 1 moves the Button up and 0 brings it back to its original position. If more than One button is added at the Footer, each Button should have its own Call to the ButtonAnimate() Function with 1 & 0 Values at the Command Button & Form Footer MouseMove Event Procedures respectively.
–oOo–
Download Demo
Next >> Create 3D Text Headings on Forms and Reports


















Advantageously, the post is in reality the freshest topic on curing acne naturally. I concur with your conclusions and will thirstily look forward to your upcoming updates. Just saying thanks will not just be enough, for the phenomenal clarity in your writing. I will right away grab your rss feed to stay abreast of any updates.
You truly a extremely smart individual! Nice post! GA continually also my biggest earning. Nevertheless, it’s not a much.
Good blog, lots of useful information. happens all the time
This is a great site, I love the theme you are using. I Stumbled it for you and bookmarked it on Digg. By the way, if you get a moment, check out my Warcraft Gold Guide
I am tired of these money making schemes. All I do is publish my content to article sites to get web traffic.