H
Hoopster
Please help!
I have a Report that is getting it's Data from a Select Query. The
Query has five Columns named, Pass/Repair/Reject 1, Pass/Repair/Reject 2,
Pass/Repair/Reject 3, Pass/Repair/Reject 4, Pass/Repair/Reject 5 and five
other Columns named Repair/Reject Comments 1, Repair/Reject Comments 2,
Repair/Reject Comments 3, Repair/Reject Comments 4, & Repair/Reject Comments
5. The Auditor will choose from a Drop Down list Pass, Repair or Reject to
populate the Pass/Repair/Reject Columns and add an abbreviated reason in the
Repair/Reject Comments Field. What I am trying to do is for each time the
Pass/Repair/Reject Field is populated with either Repair or Reject, is read
the comment in the Repair/Reject Comments Field and display it in an Unbound
Control called Repair Comments on a Report. I have tried everything I can
possibly think of but cannot get it to work. I have downloaded and went
through Duane Hookom's example on the web but still am at a loss. I have
tried all the following and then some I can't even remember:
I have used the following in a new Column in the Query:
Repair1: Concatenate("SELECT [Repair/Reject Comments 1] FROM [Flag Audits
Query] WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] & """")
Repair1: SELECT(["Repair/Reject Comments 1]" FROM "[Flag Audits Query]"
WHERE "[Pass/Repair/Reject 1] = Repair")
I have used the following as an Expression in the Control Source of the
Control Repair Comments:
Concatenate("SELECT [Repair/Reject Comments 1] FROM [Flag Audits Query]
WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] & """")
=Concatenate("SELECT [Repair/Reject Comments 1] FROM [Flag Audits Query]
WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] & """")
= SELECT(["Repair/Reject Comments 1]" FROM "[Flag Audits Query]" WHERE
"[Pass/Repair/Reject 1] = Repair")
= DLookup("[Repair/Reject Comments 1]", "[Flag Audits Query]",
"[Pass/Repair/Reject 1] = 'Repair'")
I have used the following in the Visual basic Code behind the Report:
varRepair1 = Concatenate ("SELECT [Repair/Reject Comments 1] FROM [Flag
Audits Query] WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] &
"""")
varRepair1 = SELECT(["Repair/Reject Comments 1]" FROM "[Flag Audits Query]"
WHERE "[Pass/Repair/Reject 1] = Repair")
varRepair1 = DLookup("[Repair/Reject Comments 1]", "[Flag Audits Query]",
"[Pass/Repair/Reject 1] = 'Repair'")
I have a Report that is getting it's Data from a Select Query. The
Query has five Columns named, Pass/Repair/Reject 1, Pass/Repair/Reject 2,
Pass/Repair/Reject 3, Pass/Repair/Reject 4, Pass/Repair/Reject 5 and five
other Columns named Repair/Reject Comments 1, Repair/Reject Comments 2,
Repair/Reject Comments 3, Repair/Reject Comments 4, & Repair/Reject Comments
5. The Auditor will choose from a Drop Down list Pass, Repair or Reject to
populate the Pass/Repair/Reject Columns and add an abbreviated reason in the
Repair/Reject Comments Field. What I am trying to do is for each time the
Pass/Repair/Reject Field is populated with either Repair or Reject, is read
the comment in the Repair/Reject Comments Field and display it in an Unbound
Control called Repair Comments on a Report. I have tried everything I can
possibly think of but cannot get it to work. I have downloaded and went
through Duane Hookom's example on the web but still am at a loss. I have
tried all the following and then some I can't even remember:
I have used the following in a new Column in the Query:
Repair1: Concatenate("SELECT [Repair/Reject Comments 1] FROM [Flag Audits
Query] WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] & """")
Repair1: SELECT(["Repair/Reject Comments 1]" FROM "[Flag Audits Query]"
WHERE "[Pass/Repair/Reject 1] = Repair")
I have used the following as an Expression in the Control Source of the
Control Repair Comments:
Concatenate("SELECT [Repair/Reject Comments 1] FROM [Flag Audits Query]
WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] & """")
=Concatenate("SELECT [Repair/Reject Comments 1] FROM [Flag Audits Query]
WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] & """")
= SELECT(["Repair/Reject Comments 1]" FROM "[Flag Audits Query]" WHERE
"[Pass/Repair/Reject 1] = Repair")
= DLookup("[Repair/Reject Comments 1]", "[Flag Audits Query]",
"[Pass/Repair/Reject 1] = 'Repair'")
I have used the following in the Visual basic Code behind the Report:
varRepair1 = Concatenate ("SELECT [Repair/Reject Comments 1] FROM [Flag
Audits Query] WHERE [Pass/Repair/Reject 1]=""" & [Pass/Repair/Reject 1] &
"""")
varRepair1 = SELECT(["Repair/Reject Comments 1]" FROM "[Flag Audits Query]"
WHERE "[Pass/Repair/Reject 1] = Repair")
varRepair1 = DLookup("[Repair/Reject Comments 1]", "[Flag Audits Query]",
"[Pass/Repair/Reject 1] = 'Repair'")