Minggu, 08 September 2024

Book Rental Application Microsoft Access

One day, at my place I visited a book shop/rental. I see that it is really difficult for visitors to shop visitor/anyone rent to write down books that are/will be lent. So the shop assistant was very tired and annoyed. I don't know if it's because they think the book is just reading or even just an assignment that has to be done. So I took the initiative to help by creating an application to borrow and rent books. In the future, this application may also be used for educational purposes such as school libraries or public libraries. This time I will make it with the Microsoft Access application.

CREATE DATABASE

To open this application, you can double click the book rental application. You can find it in the Microsoft office folder in the Windows start menu.  Create a blank database by clicking new blank database on the file tab. Then name this file with sewabuku in the bottom right corner.
microsoft access

Let's start by building the data needed for this application. We will use the default database from Microsoft Access. With 3 tables, namely user, buku, and sewa. Below, how to create a table is by clicking the table icon on the create tab. Save this file first by using the CTRL+S keys to save the table with the user name. To change the table name, right-click Table1 then select rename.
book rental application 1.1
Figure 1.1
The black area that I marked is the data format that will be used in the table. For ID we use this setting. Let's create another data column for the user table.
book rental application 1.2
Figure 1.2
The following is the user table properties field, in the notes for the photo I use the Attachment data type.
book rental application 1.3
Figure 1.3
The buku table has 10 fields as seen in the table view above. You can see it by clicking the view button which is just below the file bar. For the year of publication field, I use a number with the following field format:
book rental application 4
Figure 1.4
I use Validation Rule and Validation Text to make users able to only enter books published starting in 2009. This is because books that have not been available for rent for a long time.
book rental application 5
Figure 1.5
Next we will create sewa table. This table has 7 fields. Fields NOMOR_SEWA, PEMINJAM, BUKU, TANGAL_PINJAM, WAKTU_PINJAM, TANGGAL_KEMBALI, WAKTU_KEMBALI.
In this table, I will create a relational database between the sewa, user and buku tables. I created a foreign key in the PEMINJAM field by using the lookup tab in the properties field. I changed Display Control, Row Source Type, and Row Source. This can be seen in Figure 1.6 below the sewa table image that has been created. This makes it easy for users to enter their ID.
book rental application 6
Figure 1.6
Next, I also created a foreign key for the BUKU field using the lookup tab on the properties field. I changed the Display Control, Row Source Type, and Row Source. I also changed them to make it easier to choose books to rent. You can see an example of the field settings in Figure 1.7.
book rental application 7
Figure 1.7
For the fields TANGGAL_PINJAM, WAKTU_PINJAM, TANGGAL_KEMBALI, WAKTU_KEMBALI. I use the Date/Time data type so that users can only enter the date or time. Important note for setting the Default Value of the TANGGAL_PINJAM, WAKTU_PINJAM fields, I use =Now(). Due to the current date and time. Furthermore, for TANGGAL_PINJAM, and TANGGAL_KEMBALI, I use Short Date format, while for WAKTU_PINJAM, and WAKTU_KEMBALI, I use Sort time.
book rental application 8
Figure 1.8
The final stage in building a database in this program is creating relationships between tables. We will combine these three tables to carry out book rental transactions.
The first thing we have to do is click the Relationship icon on the database tab.
book rental application 9
Figure 1.9
Next, add all existing tables by clicking the Add button. If the display below does not appear, you can click Show table.
book rental application 10
Figure 1.10
After adding the 3 tables. Let's connect everything by holding the ID_BUKU field in the buku table which will be connected to the sewa table with the BUKU field. Then the ID field in the user table becomes the PEMINJAM field in the sewa table. If so, make sure it looks like this.
book rental application 11
Figure 1.11
This will make it easier for us to create the form later. It also makes it easier for us to see the data. Even though the data is very large.
The first stage is complete, this is the basic and crucial stage in creating the BOOK RENTAL program, namely creating a database. This can be seen in the pictures below.
book rental application 12
Figure 1.12
book rental application 13
Figure 1.13
book rental application 14
Figure 1.14
Please try your own application, it's delicious, isn't it? To make the application look more attractive, we will create each table form in CREATE FORM. If you want this application you may send me a message, you can find out in contact me tab in this website.
Thank You.

Tidak ada komentar:

Posting Komentar