Monday, September 17, 2018

HOW TO ENCRYPT AND DECRYPT YOUR DATABASE (PASSWORDS)

Password-protecting your database project guards against threats well known to you such as theft of the database or its objects such as tables, queries and forms by importation/exportation.

To encrypt or decrypt a Microsoft Access database you need to open it in exclusive mode.

WARNING: I recommend that you use a copy of your database in doing this as there is no remedy if you forget your password.

Encrypting your database

1.      Launch Microsoft Access
2.      Go to file and click on open as shown below

3.      Navigate to your database file’s location and select it. Click on the arrow next to the OPEN command to see the options such as Open, Open Read Only etc. Select Open Exclusive. The database will now open in exclusive mode.

4.      To encrypt the database, go to file and click on encrypt with password. The following window will appear. Enter your desired memorable password, verify it and click on OK.


5.      You may see this error message. Just click on OK. Your database is now encrypted. To open it you’ll need to enter the password.

Decrypting your database.

Immediately after encrypting your database, you can decrypt it because it is still open in exclusive mode. Otherwise, the steps to take are as follows.
1.      Launch Microsoft Access and open your database in exclusive mode (already explained above)
2.      Go to file and click on Decrypt Database as shown below.

3.      In this window enter your password and click ok. Your database is now decrypted. 

Encrypting your VBA code.

Your VBA code doesn’t have to be complex to necessitate encryption. Somewhere on this blog, there is a tutorial on how to add a real-time clock on your forms that uses a simple line of VBA code. There are many other simple ones out there that aid in simple functions such as opening your form to new record. Protecting your VBA code guards against exportation of your well-designed forms among other objects from your database therefore providing additional security. To the steps now:
1.      Open your database (you don’t have to open it in exclusive mode)
2.      Click on database tools on the ribbon and click on Visual Basic

3.      The Visual Basic Editor window will open as shown below. The DB I used for this blog post does not have code and that is why there are no objects.

4.      Click on tools > [your database name] properties to open the window below

5.      Enter your memorable password, confirm it, tick Lock Project for viewing and click ok.

6.      Now go to file > save. Your VBA code is now protected and you’ll need to enter the password whenever you need to edit the code.

Friday, August 31, 2018

How to add a classic go-to combo box to your project's forms

Introduction
A classic go-to combo box makes record navigation in forms a breeze. A user doesn’t’ have to use the next, previous, last record and first record buttons to navigate through dozens or even hundreds of records stored in underlying tables. If you have watched my videos on my YouTube channel, then you’ll notice that almost every form in my projects has this nifty combo box.

To navigate to a record all that a user needs to is to locate the record in the drop-down list and the record will be loaded on the form. Nonetheless, the go-to combo box is not a complete replacement of the aforementioned buttons; in fact, having a combination of both makes the user’s experience even much better.
The process
At this stage, you must have a form which writes data into an underlying table. Such a table can be a student details table with the following fields: StudentAdmNo, FirstName, LastName and Form.

If you create a form using the Form Wizard based on this table, it should look like the one in the image below. (extra formatting covered in this blog post)
     i.)            Open your form in design view and head straight to the design tab and select the combo box.

     i.)            Place the combo box on an appropriate place on your form. Once you place it the wizard below will be displayed. Select the last option.

      i.)            Pick the fields you want to see in the drop down list and click next > finish. Your classic go-to combo box is now ready.
     i.)            Lastly rename the label next to the combo box and save your form.




How to design visually appealing forms in Golden Wall School Inventory System

How to design visually appealing forms and reports.
Forms and reports are the interface between your system and the user. The end user will not see tables, queries, SQL code or VBA code. For this reason, you need to have presentable forms and reports.
The first step is to make your report/form pop up. Below is my Golden Wall Students form when pop up is disabled. It is plain ugly and uninspiring

To make your form pop up, open it in design view, go to the property sheet > other> set pop to yes.

The next step is to remove the scroll bars from your form. In design view, go to the property sheet > format > scroll bars > set to neither.

Now that you have set up your scroll bars to neither, your form should be of a size that does not need resizing to view other items in it. Now set your form’s border style to thin by opening your form in design view > Property sheet > Border style.
You may also want to change the following for a clean form.


Finally, if you don’t want the end user to open another object while your form/report is open, go to property sheet > Other and set modal as yes. To access other objects, the user will have to close that form or report first. This is important when you have a log in screen.
That is how you create beautiful forms and reports that are easy on the eye.



Wednesday, June 6, 2018

How to add a dashboard/switchboard/main form to your project.

It doesn’t matter what name you call it but the main form in your project is very important. For one, the end user is not going to look for the forms and reports in the navigation pane. In fact, you don’t want the end user to be able to see the navigation pane as it contains tables, queries, macros and modules – objects that the end user should not access. The end user interacts with the system through forms and reports. Secondly, a main form organises your system nicely making it a breeze to use. It basically provides access to your system’s components like forms and reports via controls.
In this blog post you will learn how to create a main form. This is just how I do it and not necessarily how it must be done.

Step 1: Creating the blank form. Go to the ribbon > Create > blank form. Name your form. You now have your blank form.

Step 2: Adding buttons to your form. Open your blank form in design view and go to the ribbon > Design > button > pick where to place your button on the form. The command button wizard will load up to help you in configuring your button. Assuming you want to use the button to open a form pick form operations > Open form and click next. A list of forms will appear so that you pick the one you want to open. After picking, click next to name your button and finish. Your button is set up.

Step 3: Formatting your buttons to look visually appealing. While still in design view click on your button and go to the ribbon > format. You can use the quick styles, change shape etc, shape fill, shape outline etc. That is what I used in the project in the video (Ms Access 2010).

Step 4: Formatting your form to look visually appealing. With creativity, there are endless possibilities as to what you can do. You can add a nice background image, insert images, inset text on the form, add a real-time clock etc. You can also make your form float by turning on the pop up in the property sheet.


For those who are new in Jerusalem, the project's video is ready and you can view it on YouTube by clicking here. It is 13 minutes long and HD but 30mb only so don’t worry about your data bundles. Remember to switch the quality to 720p. More details are in the video’s description.

Monday, May 14, 2018

How to add a real-time clock to your Access forms in Rehema School Prefects Electoral System.

Forms are the interface between your system and the user. For this reason you'd want them to look as good as possible. You also want items on them well arranged. One of the best additions to an Access form is a clock. With a clock on your form, the user does not have to look at his/her watch or the computer's clock.

You have probably noticed that whenever you add a clock to your form, it only updates when you open the form and stays frozen until you close and open the form again. This is really inconveniencing since the clock turns into just but an aesthetic addition, a mere beautification. In this blog post you will learn how to circumvent this.
In your form’s design view, go to date and time and click on ok. Time and date will be shown on your form.
A real-time clock on my Store Management form
Open your form in design view and go to property sheet > event > timer interval. Set the timer interval to 1000.
You now need to edit the on-timer event using Visual Basic. Click on the three dots beside on timer event, pick code builder and paste this code.

Private Sub Form_Timer()
Me.Auto_Time.Requery
End Sub
Save and close. Your clock is now updating in real time. This has to be done on every form that you want to put a clock.