Previous article discusses Displaying Database into the DataGrid, ListView, MSFlexGrid in Microsoft Visual Basic 6 we will now proceed to the design stage Creating Form in Microsoft Visual Basic 6. This time we will make a draft but a database that we created Earlier in the article only one table here we will add some tables and give relations between tables so that we create a form in accordance with the relationships and fields in the table.
In this article I will add two tables include Kelas and Kelas_Siswa. This is for example the relation in which each class has several students and each student has several classes. We must first add the Kelas table as shown below:
After creating the table structure then the next create Kelas_Siswa table structure as shown below:
Then the next step we will make the relations between tables by opening one of the tables will then appear Table Tools tab click Datasheet and choose Relationships.
In the show window table we will select the tables that will be related to other tables. Here we will choose the three tables that we have made. Click the table that you want to insert and then click the Add button, then it will look like this:
After that we will make a relation by drag the primary key to the table that would be a foreign key, an example of class table with my kelas_siswa aka add relationships by drag kelas_id primary key of the table heading kelas_id on kelas_siswa class. After doing dragging the Edit Relationships window will appear as shown below:
If it appears check on the Enforce Referential Integrity and check the Cascade Update Related Fields as shown above. Perform steps as above for Students with Kelas_Siswa table. So if it is given its relationship then look Relationships like picture below:
When finished making relationships then the next we input the data into tables Classes and Kelas_Siswa so that we can see the relation between tables.
If you already like the above picture then we will go to the next step Creating Form Design in Microsoft Visual Basic 6.
Descriptions of form Siswa:
– Adds 7 labels (and the height = 350 width = 1500)
– Adds 7 textboxs (and height = 350 width = 2000)
– Adds 4 CommandButtons (and height = 495 width = 800)
– Add 1 DataGrid
Please set as desired and art friends. After that we subsequently drafted a form class
Descriptions of the form Kelas:
– Add 2 labels (height = 350 dan width=1500)
– Add 2 textboxs
– Add 4 CommandButtons
Form Kelas Siswa
Descriptions of the form Kelas Siswa:
– Add 2 labels(width=2000)
– Add 2 textboxs(width=2000)
– Add 4 CommandButtons
At the stage Creating Form Design in Microsoft Visual Basic 6 This is the stage that requires the creativity of each person. Usually form highly dependent on the data that will be made of information systems or purpose application was made, because it determines the input form so that the information will be formed from the data input and will produce accurate information. The more detailed the data, the more accurate it will be the information generated by an information system or application program created for a specific purpose.