Page 1 of 1

Creating custom Database app

Posted: Mon Jan 11, 2010 8:00 pm
by hungryhounduk
Image

Hi All

Here is Tutorial on Creating Customised Database Application with VB 6.0

VB 6.0 is what i first started out with many years back when i was trying to learn programming and created these Database applications with Search > Delete > Add > and Print Functions cooll;

I used to create these Datatbases for all my Serials for my Programs and also Business Employee Database apps as well.......This is So Easy and works really well cooll;

*And to be honest I like VB6.0 for creating Databases as its so Customisable and IMHO is better than VB 2008 Pro as you have more Control over what it looks like and you dont have to connect to SQL or anything else...

*I have a really old version of Microsoft Office 97 cooll; which is fantastic for this program, I have not tried it with other Versions of Office so i dont know if this will work with the Newer Versions..

*But I have included the Whole Project below as an attachment with the Office 97 Database File as well cooll;

So lets get started

Create a Standard EXE

Add 5 Text Boxes
1 Databar
4 Buttons ( the pic above has 3 buttons as i forgot to put the Print Button ) but i will put the code here so create 4 buttons cooll;

Arrange them how you like

I have named the Labels as above to Match my Database File

1.. Click on the Databar and in the Properties, click the Database name field to access the Database and click OK
If you are using the Database i have supplied in the Project Files then go to RECORDSOURCE and select TABLE1 from the List.

2.. Next Click on each TEXTBOX and then in properties goto DATASOURCE and select DATABAR from the List

3.. Next Go to DATAFIELD and select the ID for your TEXTBOX ( if you look at the picture you will see that my FIRST TEXTBOX has a Label called ID ) This is what has to go in the DATAFIELD for the first one as its the ID Number in the Database file...Do these 3 STEPS for each Textbox Field as above, putting in the right Field that corresponds to the Database.

Name your Buttoms, CMDELETE > CMDADD > CMDSEARCH > CMDPRINT and another button which i forgot is the UPDATE BUTTON > CMDUPDATE

Search Button Code
Code: Select all
Dim SEARCHVAR As String
Dim SBOOKMARK As String
SEARCHVAR = InputBox("Enter the Program to Find")
SEARCHVAR = Trim$(SEARCHVAR)
If SEARCHVAR <> "" Then
With Databar.Recordset
SBOOKMARK = .Bookmark
.FindFirst "Program like'" + SEARCHVAR + "*'"
If .NoMatch Then
MsgBox "No matching Program Found"
.Bookmark = SBOOKMARK
End If
End With
End If
Add New Record Code
Code: Select all
Databar.Recordset.AddNew
Delete Record Code
Code: Select all
Databar.Recordset.Delete
Databar.Recordset.MoveNext
Print Button Code
Code: Select all
Me.PrintForm
Update Button Code
Code: Select all
databar.Recordset.Edit
Right if you have done all that then that concludes this tutorial

SEE how easy was that :D

* You can add a Serial Login to it as well and make it secure so that only "YOU" know the Password if the Database contains Stuff that is Private cooll;

As i have said earlier the whole project is below with all files

enjoy

and Happy Database Creation 8-)

Chris

Re: Creating custom Database app

Posted: Tue Jan 12, 2010 2:14 am
by Esky
Thanks alot!

Re: Creating custom Database app

Posted: Tue Jan 12, 2010 2:16 am
by utilities
its look good ill try when im home ...

im sure this helps me to know how to make database

Re: Creating custom Database app

Posted: Sun May 16, 2010 2:37 pm
by WindowsTechDude
wow.

Re: Creating custom Database app

Posted: Tue Mar 08, 2011 9:30 am
by riottechtalk
very long tutorial :)

Re: Creating custom Database app

Posted: Tue Mar 08, 2011 1:29 pm
by mandai
There are also similar ways of using access databases in VB.Net.

Re: Creating custom Database app

Posted: Wed Apr 13, 2011 4:07 pm
by RonaldHarvey
PRETTY COOL PROGRAM AND NICE THANKS FOR SHARING cooll;