Okay. I accidentally was able to build a query that would return results for an artist who appeared in any of the five artist fields. I built a report on that. I'm getting close to what I want. I entered [Which Artist?] as a parameter in my query, staggered in each of the artists fields. Unfortunately, I have to actually type in the artist's name, so if I make a typo, it won't work. I would rather work from a combo box, but I don't know how to do a parameter as a combo box. Also, I would like to put the artist's name at the top of my report, but it seems like I have to select either Artist 1, Artist 2, or Artist 3, etc. I don't know how to put the name of the artist I selected as the parameter to show up in a label on my report.
--- In [email protected], "Crosier, Dawn" <[EMAIL PROTECTED]> wrote: > > Can you build the query for your report using an Artist Name? If you > can, you can use the Forms![yourFormName].[cboArtistName] as the > criteria for your fields and see if you return what you are looking for. > You may have to play around with whether you want an And Query or an OR > Query. > > When you do it in code, the following might work: > > strWhere = "[Artist1]=" & "'" & Me![cboArtistName] & "'" > strWhere = strWhere & "[Artist2]=" & "'" & Me![cboArtistName] & "'" > strWhere = strWhere & "[Artist3]=" & "'" & Me![cboArtistName] & "'" > strWhere = strWhere & "[Artist4]=" & "'" & Me![cboArtistName] & "'" > strWhere = strWhere & "[Artist5]=" & "'" & Me![cboArtistName] & "'" > > That should concatenate all the Artist Fields together to filter your > report. There may be problems with the above, because I can't test it, > so extra quote marks may very well be needed. > > Dawn Crosier > Application Specialist > "Education Lasts a Lifetime" > > This message was posted to a newsgroup. Please post replies and > questions to the group so that others can learn as well. > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Garry > Sent: Wednesday, March 22, 2006 4:17 PM > To: [email protected] > Subject: [ms_access] Re: Report help > > Thanks again. I think I'm starting to get it. Here's the problem, > though. There are actually five combo boxes (Artist 1, Artist 2, Artist > 3, Artist 4, and Artist 5) that I use for my data entry. I want to > display the comic info for all comics where the artist's name appears as > Artist 1, Artist 2, Artist 3, Artist 4, OR Artist 5. There is one table > for all the artist's names, and I use that table for all five of the > combo boxes, but the info is stored in five different fields in my > "Comics" table when I enter it. > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
