txgeekgirl
Registered User.
- Local time
- Today, 15:33
- Joined
- Jul 31, 2008
- Messages
- 187
I always come up with these off the wall things - so let this be no different...
I have a preview screen that gets written by what is selected on a form
This is NOT stored as a whole anywhere, nor do I want it to be...
What I do want is that when they hit SUBMIT it does write that summary to a report and gives them the option to print.
Would it be easier to copy that code to the backend of a report or should I briefly store to a Global and try to code the report that way? I guess I am looking for an easy option without having to store the synopsis to a table.
I have a preview screen that gets written by what is selected on a form
Code:
Private Sub Form_Load()
Dim MyStr As String
Dim Q2 As String
Dim Q3 As String
Dim Q4 As String
Me.tbFindings = MyID
If DLookup("CH2", "Findings", "[FindingID] = " & Me.tbFindings) = True Then
Q2 = " At this time I am requesting training regarding the area of deficiency. "
Q2 = Q2 & "Specifically I am requesting: " & DLookup("CH2Text", "Findings", "[FindingID] = " & Me.tbFindings)
Else
Q2 = ""
End If
If DLookup("CH3", "Findings", "[FindingID] = " & Me.tbFindings) = True Then
Q3 = " At this time I believe the Audit does not reflect the program performance and am requesting mediation with the DED . "
Q3 = Q3 & "Specifically: " & DLookup("CH3Text", "Findings", "[FindingID] = " & Me.tbFindings)
Else
Q3 = ""
End If
If DLookup("CH4", "Findings", "[FindingID] = " & Me.tbFindings) = True Then
Q4 = " Audit Findings were due to management issues with staff. "
Q4 = Q4 & "Specifically: " & DLookup("CH4Text", "Findings", "[FindingID] = " & Me.tbFindings)
Else
Q4 = ""
End If
' Write Summary
MyStr = "In response to the Finding/Trend: " & DLookup("POIDetails", "Findings", "[FindingID] = " & Me.tbFindings)
MyStr = MyStr & vbNewLine & vbNewLine & " I contacted " & DLookup("Auditor", "Findings", "[FindingID] = " & Me.tbFindings) & " on "
MyStr = MyStr & DLookup("ContactDate", "Findings", "[FindingID] = " & Me.tbFindings) & " to discuss the Audit Findings."
MyStr = MyStr & Q2 & Q3 & Q4
MyStr = MyStr & vbNewLine & vbNewLine & " The corrective action I plan to take is the following: " & DLookup("POICorAction", "Findings", "[FindingID] = " & Me.tbFindings)
MyStr = MyStr & vbNewLine & vbNewLine & " My plan to oversight the corrective action to ensure future compliance is: " & DLookup("POIOversight", "Findings", "[FindingID] = " & Me.tbFindings)
MyStr = MyStr & " This POI will be implemented by: " & Str(DLookup("POIImpDate", "Findings", "[FindingID] = " & Me.tbFindings))
Me.tbMemoPreview = MyStr
End Sub
This is NOT stored as a whole anywhere, nor do I want it to be...
What I do want is that when they hit SUBMIT it does write that summary to a report and gives them the option to print.
Would it be easier to copy that code to the backend of a report or should I briefly store to a Global and try to code the report that way? I guess I am looking for an easy option without having to store the synopsis to a table.