Eliminating certain text

Lucretia

Registered User.
Local time
Today, 06:27
Joined
Oct 5, 2007
Messages
13
Sorry, another question kind of related to my last one:

In the location field, there can be two values:
Circ or Ref

If the value is Circ, I do not want this data to display on my report. If the value is Ref, then I want the report to say Ref.

Please note that I am currently displaying this field in my report as:

=[Location]+(Chr(13) & Chr(10)) & [callnumber]+(Chr(13) & Chr(10)) & [Online Availability]+(Chr(13) & Chr(10)) & [PF Subject]

Thanks again!
 
=IIf([Location]="Circ","",[Location]+(Chr(13) & Chr(10)) & [callnumber]+(Chr(13) & Chr(10)) & [Online Availability]+(Chr(13) & Chr(10)) & [PF Subject])
 
Almost . . .

Thanks so much for your reply - - your solution almost works :)

When I enter it into my report, sure enough, Circ does not display and Ref does. The problem is that none of the other field data displays when the location is Circ. Typically, when the location is Circ, there is a call number in the call number field that I still want to display.

E.g. instead of:

Circ
HN 234 .756 2004


I just want to see:

HN 234 .756 2004

I appreciate your help very much! I am scheduled to take an MS Access course, but I have been handed this report to work on before it has started!
 
=IIf([Location]="Circ","",[callnumber]+(Chr(13) & Chr(10)) & [Online Availability]+(Chr(13) & Chr(10)) & [PF Subject])

Remove any other Chr(13) & Chr(10) which is the same as VbCrLf if you don't want it on a separate line. I don't know your data fields well enough to get it exactly as you want it. But, just know that if you see the +Chr(13) & Chr(10) you will get the next text on a separate line. Pull that out if you want the text on one line.
 
ok on the details properitres on your report
have
if field= Circ then field.visible=false
if field = REf then field.visble=true

end if
should do it ..
this basically say's if (name of field ) = circ then make me invisible
and if REf then make me visible...
 
Hmmmm....

:confused: Bob Larson: Thanks for your help. It isn't the separate line that's the problem - - at least I don't think it is?

The problem is that I only want to block 'Circ' from displaying and not any other data in that same field (like Ref or PF, etc) or any data in the other fields (call number, online availability, etc.).

Thanks again if you are able to provide any assistance.

=IIf([Location]="Circ","",[callnumber]+(Chr(13) & Chr(10)) & [Online Availability]+(Chr(13) & Chr(10)) & [PF Subject])

Remove any other Chr(13) & Chr(10) which is the same as VbCrLf if you don't want it on a separate line. I don't know your data fields well enough to get it exactly as you want it. But, just know that if you see the +Chr(13) & Chr(10) you will get the next text on a separate line. Pull that out if you want the text on one line.
 
Details properties?

GaryPanic:

Thanks for your reply. I am so new to MS Access that I'm not sure what you mean by details properties. Can you point me in the right direction? I currently have data in the control source of my textbox.

Thanks in advance for any further assistance :)

ok on the details properitres on your report
have
if field= Circ then field.visible=false
if field = REf then field.visble=true

end if
should do it ..
this basically say's if (name of field ) = circ then make me invisible
and if REf then make me visible...
 
More help, please?

Sorry to be a pest, but I'm wondering if anyone else can help me with this problem. Since I don't know Access, but have to work on this report, it's kind of been a crash course and I can't quite understand the options with the Iif function that quite meet my criteria.
Thanks in advance.
 
Maybe I don't understand this correctly, but I suspect you are looking for something like this:

=IIF([Location]="Circ",[callnumber]+(Chr(13) & Chr(10)) & [Online Availability]+(Chr(13) & Chr(10)) & [PF Subject],[Location]+(Chr(13) & Chr(10)) & [callnumber]+(Chr(13) & Chr(10)) & [Online Availability]+(Chr(13) & Chr(10)) & [PF Subject])
 
So close . . .

Thanks for your reply. That worked very well!! :-)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom