MsLady
Traumatized by Access
- Local time
- Today, 11:56
- Joined
- Jun 14, 2004
- Messages
- 438
Hello friends,
I have a form that displays a summary of my records (from my lovely work request database).
A textbox named txtRequest should display a concantenation of the workrequestType based on an IIF statement in this matter.
The fields in my table are:
[R1] meaning primary request , [requestDetails] primary request details,
[R2] meaning secondary request, [requestDetails2] secondary request details
I would like my report to display: [R1]-[requestDetails] / [R2]-[requestDetails2] and to omit any that does not exist.
Like if any of the requestDetails is missing, the leading "-" should not be displayed (it confuses my users to think there's something missing). If a secondary request [R2] does not exist, "/" should not be displayed. And obvisiouly there can't be a [requestDetails2] if [R2] does not exist.
Note: [R1] and [R2] are dropdown of the common work requests. Now once they select a request, there's a textbox where they must provide details [requestDetails] if they have any. Sometime they don't provide details, which is okay. But i'd like to display the info in a clean smart manner.
Here's what i currently have and it displays nothing...! comes up blank!
Here's the kindergaten IIF statement i had before and was working properly before my boss started bugging me.
I have a been struggling with this for quite a while now, and i have just lost every hope of doing this on my own, so please can anyone be so kind to help?
I have a form that displays a summary of my records (from my lovely work request database).
A textbox named txtRequest should display a concantenation of the workrequestType based on an IIF statement in this matter.
The fields in my table are:
[R1] meaning primary request , [requestDetails] primary request details,
[R2] meaning secondary request, [requestDetails2] secondary request details
I would like my report to display: [R1]-[requestDetails] / [R2]-[requestDetails2] and to omit any that does not exist.
Like if any of the requestDetails is missing, the leading "-" should not be displayed (it confuses my users to think there's something missing). If a secondary request [R2] does not exist, "/" should not be displayed. And obvisiouly there can't be a [requestDetails2] if [R2] does not exist.
Note: [R1] and [R2] are dropdown of the common work requests. Now once they select a request, there's a textbox where they must provide details [requestDetails] if they have any. Sometime they don't provide details, which is okay. But i'd like to display the info in a clean smart manner.
Here's what i currently have and it displays nothing...! comes up blank!
Code:
=IIf(IsNull([R2]),(IIf(IsNull([requestDetails]),[R1],([R1] & "-" & [requestDetails])),([R1] & "-" & [requestDetails] & " / " & [R2] & "-" & [requestDetails2])))
Code:
=IIf(IsNull([R2]),[R1],([R1] & " / " & [R2]))
I have a been struggling with this for quite a while now, and i have just lost every hope of doing this on my own, so please can anyone be so kind to help?