| View previous topic :: View next topic |
| Author |
Message |
Wally*Won_Kenobie Newbie
Joined: 14 Mar 2004 Posts: 5
|
Posted: Mar 14th, 2004 09:40 PM Post subject: My Games database |
|
|
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 
Last edited by Wally*Won_Kenobie on Mar 15th, 2004 04:39 PM; edited 2 times in total |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Mar 15th, 2004 02:08 PM Post subject: |
|
|
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  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Wally*Won_Kenobie Newbie
Joined: 14 Mar 2004 Posts: 5
|
Posted: Mar 15th, 2004 04:41 PM Post subject: |
|
|
Thanks for your help though
There is a "Fair Bit of Data" There! =D |
|
| Back to top |
|
Wally*Won_Kenobie Newbie
Joined: 14 Mar 2004 Posts: 5
|
Posted: Mar 15th, 2004 08:59 PM Post subject: |
|
|
| But yeah I should try it as its a list! |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Mar 17th, 2004 09:03 AM Post subject: |
|
|
Let us know if you need more help  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Wally*Won_Kenobie Newbie
Joined: 14 Mar 2004 Posts: 5
|
Posted: Mar 17th, 2004 06:22 PM Post subject: |
|
|
ok then
But could you just analyse the file and see if you can get it working? |
|
| Back to top |
|
|