Creating custom Database app

All tutorials created in VB6 to be posted in here.
7 posts Page 1 of 1
Contributors
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Creating custom Database app
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
You do not have the required permissions to view the files attached to this post.
Image
User avatar
Esky
VIP - Donator
VIP - Donator
Posts: 86
Joined: Tue Dec 22, 2009 11:36 am

Re: Creating custom Database app
Esky
Thanks alot!
Current Project: Server Browser - Beta & Text based MMORPG
Image
User avatar
utilities
Member
Member
Posts: 45
Joined: Wed Oct 21, 2009 1:23 pm

Re: Creating custom Database app
utilities
its look good ill try when im home ...

im sure this helps me to know how to make database
Image
Image
User avatar
WindowsTechDude
Just Registered
Just Registered
Posts: 3
Joined: Sat May 15, 2010 8:44 pm

wow.
User avatar
riottechtalk
New Member
New Member
Posts: 11
Joined: Sat Feb 19, 2011 4:12 am

very long tutorial :)
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Creating custom Database app
mandai
There are also similar ways of using access databases in VB.Net.
User avatar
RonaldHarvey
Top Poster
Top Poster
Posts: 113
Joined: Tue Apr 05, 2011 2:32 pm

PRETTY COOL PROGRAM AND NICE THANKS FOR SHARING cooll;
7 posts Page 1 of 1
Return to “VB6 Tutorials”