Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting

Post new topic   Reply to topic
My Games database
View previous topic :: View next topic  
Author Message
Wally*Won_Kenobie
Newbie


Joined: 14 Mar 2004
Posts: 5

PostPosted: Mar 14th, 2004 09:40 PM    Post subject: My Games database Reply with quote

Source: Dosgames.com forums by me of course

Please help me with this database, my friend tried to fix it many times but never succeded. If you can make either a combo box for searching or have the list down the bottom with all games there so when you type the name it shortens the results down. (Downloading of the database required)

Also I would like some scrolling credits probably in the about box that needs making also it will have to pop up in another window.

This is the code

Dim rst As String

Private Sub Command1_Click()
Data1.Recordset.MoveLast

End Sub

Private Sub Command2_Click()
Data1.Recordset.MoveFirst

End Sub

Private Sub Command3_Click()
Data1.Recordset.Delete

End Sub

Private Sub Command4_Click()
Data1.Recordset.MoveNext
End Sub

Private Sub Command5_Click()
ata1.Recordset.MovePrevious
End Sub

Private Sub Form_Load()
'CallAdd

End Sub
Private Sub CallAdd()
'Dim Database As Data

'Do Until Database.Recordset.EOF
'Combo1.AddItem Database.Recordset.Fields(Index)
'Loop
End Sub

Private Sub Text8_Change()

Do Until rst.EOF
' Always test for nulls
If Not IsNull(rst!Desc) Then List1.AddItem rst!Desc
If Not IsNull(rst!UomID) Then List1.ItemData(cbo.NewIndex) = rst!UomID
' Forget the movenext and you get an end
' less loop and
' an overflow error.
rst.MoveNext
Loop


End Sub


The source is here [link]

If you manage to get it working with one of the options up the top please email the source to me in a winzip file. (email is wally4000@dosgames.com)

And you will instantly be added to the credits otherwise you can add yourself there

Edit: I fixed the file up Wink


Last edited by Wally*Won_Kenobie on Mar 15th, 2004 04:39 PM; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Mar 15th, 2004 02:08 PM    Post subject: Reply with quote

The file could not be found...

Here is a simple example... If you add all the data in a collection for this example :

[vb:1:505ba8f9c8]Option Explicit

Dim Col As New Collection

Private Sub Form_Load()
Col.Add "Cat"
Col.Add "Dog"
Col.Add "Mouse"
Col.Add "computer"
Col.Add "test"
Col.Add "school"
Col.Add "database"
End Sub

Private Sub Text1_Change()
List1.Clear
Dim i As Integer
For i = 1 To Col.Count
If InStr(LCase(Col.Item(i)), LCase(Text1.Text)) Then
List1.AddItem Col.Item(i)
End If
Next
End Sub[/vb:1:505ba8f9c8]

it loops through all the items and all you need to do now is change the collection with a loop for all the items in the database Wink
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Wally*Won_Kenobie
Newbie


Joined: 14 Mar 2004
Posts: 5

PostPosted: Mar 15th, 2004 04:41 PM    Post subject: Reply with quote

Thanks for your help though
There is a "Fair Bit of Data" There! =D
Back to top
View user's profile Send private message Visit poster's website
Wally*Won_Kenobie
Newbie


Joined: 14 Mar 2004
Posts: 5

PostPosted: Mar 15th, 2004 08:59 PM    Post subject: Reply with quote

But yeah I should try it as its a list!
Back to top
View user's profile Send private message Visit poster's website
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Mar 17th, 2004 09:03 AM    Post subject: Reply with quote

Let us know if you need more help Wink
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Wally*Won_Kenobie
Newbie


Joined: 14 Mar 2004
Posts: 5

PostPosted: Mar 17th, 2004 06:22 PM    Post subject: Reply with quote

ok then Wink


But could you just analyse the file and see if you can get it working?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic