Hello,
I'm completely new to MS Access. I'm trying to use Access to generate text reports in a standardized format.
I have one table with a text field formatted as Long Text.
I have a form that displays the text field. That form also has buttons that the user presses to generate text that gets added to the end of any existing text (if there is any) already in the text field.
For instance, the user is conducting a fire inspection on a building. One button will enter the preamble to the report:
Code:
Private Sub b_Conclude_Click()
Text_ROI.SetFocus
Me!Text_ROI.SelStart = Me!Text_ROI.SelLength + 1
Text_ROI.Text = Text_ROI + Chr(13) + Chr(10) + Chr(13) + Chr(10) + "FIRE INSPECION 20XX-XXX" + Chr(13) + Chr(10) + Chr(13) + Chr(10) + "A fire inspection was conducted on facility XXX of zone XXX."
End Sub
The next button adds information about the sprinkler system (and the user doesn't press that button if there isn't a sprinkler system):
Code:
Private Sub b_Conclude_Click()
Text_ROI.SetFocus
Me!Text_ROI.SelStart = Me!Text_ROI.SelLength + 1
Text_ROI.Text = Text_ROI + Chr(13) + Chr(10) + Chr(13) + Chr(10) + "SPRINKLER SYSTEM" + Chr(13) + Chr(10) + Chr(13) + Chr(10) + "The facility contains a XXX type sprinkler system. All elements of the sprinkler system conform to NFPA XXXX."
End Sub
And so on. There are about 50 buttons, but the point is to allow the inspector to generate a multipage report in a certain format with just the details to be filled in manually. The text field can then be copied into email or a Word document.
The problem I'm having is that while the text field can lots of text, apparently the code I'm using to append the new text onto the end of the existing text is hitting a limit and after entering a certain amounts throws the following error:
Run-time error '2176':
The setting for this property is too long
What is a better way for me to insert the next chunk of text?
Thanks!!