Hi,
I was wondering if anyone might be able to help me here.
In a report, is there any way i can set a size for a textbox?
for example, there is a field in a table that has value of
SEPP (Air Quality)
EPA licences
EPA buffer zone document, AQ286
However, in the report, the textbox called TB_References that i assigned the value to only shows one line i.e SEPP (Air Quality). I have made sure that the can grow = "yes". It only shows the three lines there if i extend the height of the textbox.
I don't understand why the can-grow feature doesn't work. I don't know if the program i wrote causes it. I have checked it however, by using the msgbox to output me.TB_References. It actually shows the full value i.e. three lines of words there.
here is the code
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim response, key As String
Dim rsNew As New ADODB.Recordset
rsNew.Open "Select * from [Framework Outline]", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If Me.Structure <> "P" Then
Do Until rsNew.EOF
If rsNew!FO_ID = Me.Structure Then
Me.TB_References = rsNew!References
Exit Do
End If
rsNew.MoveNext
Loop
ElseIf Me.Structure = "P" Then
Me.TB_References = Me.References
End If
rsNew.Close
End Sub
what this code does is it checks if the structure is "P". If it's P, it'd immediately print the data to the report. Or else, it'd go look up the same table for the FO_ID that has the same value as the structure. It takes the value of the wanted field i.e. References and assign it to the TB_References.
At first, i thought it'd be quite easy but i was wrong. I already spent a lot of time on this but couldn't exactly solve this as to why the TB_Reference doesn't show the entire value given that the "can grow" is set to yes.
Your help is greatly appreciated. Thank you in advance
I was wondering if anyone might be able to help me here.
In a report, is there any way i can set a size for a textbox?
for example, there is a field in a table that has value of
SEPP (Air Quality)
EPA licences
EPA buffer zone document, AQ286
However, in the report, the textbox called TB_References that i assigned the value to only shows one line i.e SEPP (Air Quality). I have made sure that the can grow = "yes". It only shows the three lines there if i extend the height of the textbox.
I don't understand why the can-grow feature doesn't work. I don't know if the program i wrote causes it. I have checked it however, by using the msgbox to output me.TB_References. It actually shows the full value i.e. three lines of words there.
here is the code
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim response, key As String
Dim rsNew As New ADODB.Recordset
rsNew.Open "Select * from [Framework Outline]", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If Me.Structure <> "P" Then
Do Until rsNew.EOF
If rsNew!FO_ID = Me.Structure Then
Me.TB_References = rsNew!References
Exit Do
End If
rsNew.MoveNext
Loop
ElseIf Me.Structure = "P" Then
Me.TB_References = Me.References
End If
rsNew.Close
End Sub
what this code does is it checks if the structure is "P". If it's P, it'd immediately print the data to the report. Or else, it'd go look up the same table for the FO_ID that has the same value as the structure. It takes the value of the wanted field i.e. References and assign it to the TB_References.
At first, i thought it'd be quite easy but i was wrong. I already spent a lot of time on this but couldn't exactly solve this as to why the TB_Reference doesn't show the entire value given that the "can grow" is set to yes.
Your help is greatly appreciated. Thank you in advance