R
Ranjan Mitra via AccessMonster.com
Hi!
I have a problem. I am developing a library software of CDs in VB6 with
Access 2000. The search command for title, artist and composer are simple
involving single fields, but I simply do not know how to search for tracks
for which I have 18 field as Track 1 Track 2 .....Track 18 all in a single
table. I tried this:
Private Sub cmdTrack_Click()
prompt$ = "Enter the full Track Name."
SearchStr$ = InputBox(prompt$, "Track Search")
For i = 1 To datLib.Recordset.Fields.Count - 1
datLib.Recordset.Index = datLib.Recordset.Fields(i).Name
datLib.Recordset.Seek "=", SearchStr$ 'and search
Next i
If datLib.Recordset.NoMatch Then 'if no match
datLib.Recordset.MoveFirst
End If
End Sub
But this dosen't work! Please help.
I have a problem. I am developing a library software of CDs in VB6 with
Access 2000. The search command for title, artist and composer are simple
involving single fields, but I simply do not know how to search for tracks
for which I have 18 field as Track 1 Track 2 .....Track 18 all in a single
table. I tried this:
Private Sub cmdTrack_Click()
prompt$ = "Enter the full Track Name."
SearchStr$ = InputBox(prompt$, "Track Search")
For i = 1 To datLib.Recordset.Fields.Count - 1
datLib.Recordset.Index = datLib.Recordset.Fields(i).Name
datLib.Recordset.Seek "=", SearchStr$ 'and search
Next i
If datLib.Recordset.NoMatch Then 'if no match
datLib.Recordset.MoveFirst
End If
End Sub
But this dosen't work! Please help.