Hi all, I'm trying to generate a report showing projects and clients in a given month.
All well and good. The bad is that there are Individual clients, Miscellaneous clients, and regular clients. Individual and Miscellaneous clients have an associated name or organization; regular clients stand as they are.
If a client is either Ind or Misc, I want the report to print out the associated detail info.
My first stab at it layered text boxes on top of each other and used a few "If...then" statements to toggle the visibility of the box in question.
Did I stop there? Nooo...I had to try to make it more elegant, so I created an unbound textbox and inserted this expression:
txtClient = IIf(Me![Client] = "Individual", "Individual - " & [LastName] & ", " & [FirstName], IIf([Client] = "Misc", "Misc - " & [MiscClient], [Client]))
(English explanation):
If [Client} is "Individual", the report will show: Individual - {lastname}, {firstname}
If [Client] is "Misc", it will show: Misc - {miscClient}
otherwise it just shows the normal client name.
But the report doesn't recognize any of the field names! I'm totally stumped--how do I access a field that appears in the report's underlying query? It seem like it should be very, very easy....
Any help (or suggestions about the approach) would be very much appreciated!
thanks,
J
All well and good. The bad is that there are Individual clients, Miscellaneous clients, and regular clients. Individual and Miscellaneous clients have an associated name or organization; regular clients stand as they are.
If a client is either Ind or Misc, I want the report to print out the associated detail info.
My first stab at it layered text boxes on top of each other and used a few "If...then" statements to toggle the visibility of the box in question.
Did I stop there? Nooo...I had to try to make it more elegant, so I created an unbound textbox and inserted this expression:
txtClient = IIf(Me![Client] = "Individual", "Individual - " & [LastName] & ", " & [FirstName], IIf([Client] = "Misc", "Misc - " & [MiscClient], [Client]))
(English explanation):
If [Client} is "Individual", the report will show: Individual - {lastname}, {firstname}
If [Client] is "Misc", it will show: Misc - {miscClient}
otherwise it just shows the normal client name.
But the report doesn't recognize any of the field names! I'm totally stumped--how do I access a field that appears in the report's underlying query? It seem like it should be very, very easy....
Any help (or suggestions about the approach) would be very much appreciated!
thanks,
J