subform datasheet shows too many records (1 Viewer)

alelover

Registered User.
Local time
Today, 05:06
Joined
Nov 5, 2008
Messages
12
Hello all,
I have built a database for my music CD collection. I would like to be able to search by track name and pull up the records that have only those tracks on them. I can do it to some extent but it isn't right. I have set up different parameters I can search by. They all work exactly how they should except for when I search by track name. I can have it one of 2 ways. I have 4 concerts in a table and 69 songs total for the 4 concerts. If I want the search to work when I open the Form I have to put all the tracks on the same query as the concert info. But when I open the form, instead of having 4 records with the list of songs for each concert. I get 69 records with the list of songs for each concert. So if there are 20 songs in one concert I get 20 records for that concert instead of just one like I want. If I want to show only the amount of records that corresponds to the number of concerts I have to disable the search by tracks function. I attached the dB. If someone could look at it I would be very grateful.
View attachment CondensedDead.zip
 

ezfriend

Registered User.
Local time
Today, 02:06
Joined
Nov 24, 2006
Messages
242
You have 69 records because your query "qryRecordings" returns 69 rows.
Really, your Record Source for the form "Recordings" should just be the table "Recordings"
This will give you your 4 concerts (records). Linking the Master & Child ID for the subform is correct.

Note: look at your form "New Recordings".

or maybe fixed your strWhere to
Code:
strWhere = strWhere & "([TrackTitle] Like  '*" & Replace(Me.txtTrackTitle, "'", "''") & "*' ) AND "
 
Last edited:

alelover

Registered User.
Local time
Today, 05:06
Joined
Nov 5, 2008
Messages
12
I think I may have tried that already because now I can't search by track title anymore. Which was the original main problem. I got the search to work but then I had all the extra records showing up. I need to be able to search by track title and not have all the duplicate records for each entry in my subform. When I search by TrackTitle Enter Parameter Value box pops up. See attached.
 

Attachments

  • enter-parameter-value.jpg
    enter-parameter-value.jpg
    30.7 KB · Views: 138

alelover

Registered User.
Local time
Today, 05:06
Joined
Nov 5, 2008
Messages
12
And this when I debug. Highlighted in yellow.
Me.FilterOn = True
I'm guessing it can't find the Track data.
Is there a way to get it to pull the data from a different record source than what the main form pulls from.

 

Users who are viewing this thread

Top Bottom