Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / May 2005

Tip: Looking for answers? Try searching our database.

Access 2000 with VB6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ranjan Mitra - 17 May 2005 20:23 GMT
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.
Douglas J. Steele - 18 May 2005 01:12 GMT
Sounds like your database could use a redesign. You shouldn't have 18 fields
in a single record: how are you going to handle those CDs with 19, 20 or
more tracks?

You need a second table, where you can store each track as a separate row.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi!
> I have a problem. I am developing a library software of CDs in VB6 with
[quoted text clipped - 15 lines]
> End Sub
> But this dosen't work! Please help.
Tim Ferguson - 18 May 2005 17:04 GMT
> The search command for title, artist and composer are simple
> involving single fields

Not sure that I agree with this. Titles pretty much always single
attributes, but it is common to have more than one artist and more than one
composer for a CD. You might want to think about putting these in a more
normalised structure too.

All the best

Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.