Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Changes in a report ?

Status
Not open for further replies.

ckeener

Programmer
Dec 2, 2003
53
US
I am trying to get a textbox to show something if the information in the box equals something. Specifically, if the artist is one of several, then show the artist name followed by the album name, else show only the artist name. Is there a way to do this?
 
Very much possible. If you provide some more information such as sample records and how you want the output to display, we might be more helpful.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
OK, I guess I could have given a little more info. The report has several pieces of information about each song on a playlist, such as the position of the song on the list, the tempo of the song, the title, rating, and the artist. However, if the artist is, say "PCC" or the "Joy Singers", then I would like the artist text box to include the artist name and the album name such as "PCC - Now More Than Ever". Otherwise, it should just have the artist name, such as "Ron Hamilton". I hope this is what yoiu were asking for.

Thanks,
Caleb
 
I hope the following helps.
I would set up the database with several tables and relate them so that the author table links to the albums table (which includes an author field).
I would create a form for the author and then make a subform with the album records. In the report object this subreport will grow according to the number of albums contained in the relationship. You can create more subforms/subreports to include other related information about the author.
 
Well, I can't change the current table setup and I really only need the album included on a few artists, Maybe 5 of the 500 or so that I have in my database. For the rest of the Songs on the list, having the Control Source of the textbox set to the artist really works just fine. It is just being able add the album to only the few artists that seems to give me trouble.
 
ckeener,
I'm often confused why posters ignore a simple request "such as sample records and how you want the output to display". It seems so basic that those of us that provide support could do so quite easily if we knew this information. Can't you copy and paste a few records into a reply and add some field names? Could you take the time to type what you would actually like your output on your report to look like? Maybe others who reply like creating long threads of back-and-forth guesses but I would think a quick resolution of a question based on good information from the original poster would be our goal.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Duanne,
This is a Sample Record from the qryLogSongPrint that is the recordsource of the rptPrintLog

LogRef SongRef SongPosition Tempo NewStationCode
211 21434 2 MS MS PCC1.0C

Song Artist CopyrightYear Comments
A Tender Heart PCC 1987

SongLength CutNum Rating Album
03:14 44954 ** Wings As Eagles


The way that I am trying to get it to print out is:

2 MS MS.PCC1.0C A Tender Heart PCC-Wings As Eagles 1987 03:14 (comments if any) 44954

 
One record doesn't help much. Your first posting suggested at least two possible conditions of your record and display. Then you provide one example. How do you expect anyone to identify a pattern or discern a difference in how the report display should vary if you only provide one actual record and one displayed record?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top