If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Scrolling text on splash screen
I have a splash screen that has a field I want to put about 3 pages of text
into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? thanks, Damon |
#2
|
|||
|
|||
Scrolling text on splash screen
Use the Timer event of the form to replace the Caption of the Label.
The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? thanks, Damon |
#3
|
|||
|
|||
Scrolling text on splash screen
LOL, this is what I get for being obtuse. What I meant by "should scroll" is
that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? thanks, Damon |
#4
|
|||
|
|||
Scrolling text on splash screen
I got the code to work for a 5 line message on the same splash screen. Looks
cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? thanks, Damon |
#5
|
|||
|
|||
Scrolling text on splash screen
Hi Damon
Aploogies for the misunderstanding. If you are wanting to display formatted text with a scrollbar, grab the rich text control from Stephen Lebans' site: http://www.lebans.com/richtext.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I got the code to work for a 5 line message on the same splash screen. Looks cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? |
#6
|
|||
|
|||
Scrolling text on splash screen
Thanks for the tip, unfortunately I am unable to get this control to work. I
don't know how knowledgeable you are with it, but all I want to do is copy paste the text in my word document into the control and when the form runs be able to scroll down it. I tried copy pasting but the control will not retain the data. I tried connecting the control to a table with a memo type field that had my text as the only record but still no dice. Not sure what to do now. Thanks for you help, Damon "Allen Browne" wrote: Hi Damon Aploogies for the misunderstanding. If you are wanting to display formatted text with a scrollbar, grab the rich text control from Stephen Lebans' site: http://www.lebans.com/richtext.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I got the code to work for a 5 line message on the same splash screen. Looks cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? |
#7
|
|||
|
|||
Scrolling text on splash screen
Download the sample MDB and look at the form in Design view. You hook up the
data field for the RTF control exactly as you would for a TextBox control. It must be bound to a Memo field. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Damon" wrote in message ... Thanks for the tip, unfortunately I am unable to get this control to work. I don't know how knowledgeable you are with it, but all I want to do is copy paste the text in my word document into the control and when the form runs be able to scroll down it. I tried copy pasting but the control will not retain the data. I tried connecting the control to a table with a memo type field that had my text as the only record but still no dice. Not sure what to do now. Thanks for you help, Damon "Allen Browne" wrote: Hi Damon Aploogies for the misunderstanding. If you are wanting to display formatted text with a scrollbar, grab the rich text control from Stephen Lebans' site: http://www.lebans.com/richtext.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I got the code to work for a 5 line message on the same splash screen. Looks cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? |
#8
|
|||
|
|||
Scrolling text on splash screen
That's what I was looking to do. I can't find the Control Source attribute of
the RTF2 object so I'm not sure how to attach my memo field to it? What am I missing? "Stephen Lebans" wrote: Download the sample MDB and look at the form in Design view. You hook up the data field for the RTF control exactly as you would for a TextBox control. It must be bound to a Memo field. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Damon" wrote in message ... Thanks for the tip, unfortunately I am unable to get this control to work. I don't know how knowledgeable you are with it, but all I want to do is copy paste the text in my word document into the control and when the form runs be able to scroll down it. I tried copy pasting but the control will not retain the data. I tried connecting the control to a table with a memo type field that had my text as the only record but still no dice. Not sure what to do now. Thanks for you help, Damon "Allen Browne" wrote: Hi Damon Aploogies for the misunderstanding. If you are wanting to display formatted text with a scrollbar, grab the rich text control from Stephen Lebans' site: http://www.lebans.com/richtext.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I got the code to work for a 5 line message on the same splash screen. Looks cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? |
#9
|
|||
|
|||
Scrolling text on splash screen
How would you set the ControlSource for a native Access TextBox control?
It's the same procedure for the RTF2 control. In Form Design view Right click onthe RTF control Select Properties Select the DATA tab Select the Control Source drop down arrow From the DropDown List control select whatever field you have setup as the Memo type field for the RTF2 control Remember, just like any native Access control, the Recordsource for the Form the RTF2 control is residing on myust contain the Field you want to bind to the Control Source of the control. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Damon" wrote in message ... That's what I was looking to do. I can't find the Control Source attribute of the RTF2 object so I'm not sure how to attach my memo field to it? What am I missing? "Stephen Lebans" wrote: Download the sample MDB and look at the form in Design view. You hook up the data field for the RTF control exactly as you would for a TextBox control. It must be bound to a Memo field. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Damon" wrote in message ... Thanks for the tip, unfortunately I am unable to get this control to work. I don't know how knowledgeable you are with it, but all I want to do is copy paste the text in my word document into the control and when the form runs be able to scroll down it. I tried copy pasting but the control will not retain the data. I tried connecting the control to a table with a memo type field that had my text as the only record but still no dice. Not sure what to do now. Thanks for you help, Damon "Allen Browne" wrote: Hi Damon Aploogies for the misunderstanding. If you are wanting to display formatted text with a scrollbar, grab the rich text control from Stephen Lebans' site: http://www.lebans.com/richtext.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I got the code to work for a 5 line message on the same splash screen. Looks cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? |
#10
|
|||
|
|||
Scrolling text on splash screen
There's my problem. the RTF2 control does not have a control source option in
the Data tab; all there are, are the following three attributes: OLE Class Class Enabled. No Control Source. Any Ideas? "Stephen Lebans" wrote: How would you set the ControlSource for a native Access TextBox control? It's the same procedure for the RTF2 control. In Form Design view Right click onthe RTF control Select Properties Select the DATA tab Select the Control Source drop down arrow From the DropDown List control select whatever field you have setup as the Memo type field for the RTF2 control Remember, just like any native Access control, the Recordsource for the Form the RTF2 control is residing on myust contain the Field you want to bind to the Control Source of the control. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Damon" wrote in message ... That's what I was looking to do. I can't find the Control Source attribute of the RTF2 object so I'm not sure how to attach my memo field to it? What am I missing? "Stephen Lebans" wrote: Download the sample MDB and look at the form in Design view. You hook up the data field for the RTF control exactly as you would for a TextBox control. It must be bound to a Memo field. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Damon" wrote in message ... Thanks for the tip, unfortunately I am unable to get this control to work. I don't know how knowledgeable you are with it, but all I want to do is copy paste the text in my word document into the control and when the form runs be able to scroll down it. I tried copy pasting but the control will not retain the data. I tried connecting the control to a table with a memo type field that had my text as the only record but still no dice. Not sure what to do now. Thanks for you help, Damon "Allen Browne" wrote: Hi Damon Aploogies for the misunderstanding. If you are wanting to display formatted text with a scrollbar, grab the rich text control from Stephen Lebans' site: http://www.lebans.com/richtext.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Damon" wrote in message ... I got the code to work for a 5 line message on the same splash screen. Looks cool :-) Unfortunately, to do the 3 page long document and retain its formatting looks like a very large chore, if it is possible, which I am not sure. Right now I have the document in a Microsoft Word OLE object. It has retained the formatting but only shows as much as whatever size I make the object. All I need is to add a scroll bar so that the user can scroll down, but that seems to not be an option with the OLE object. Any suggestions? "Damon" wrote: LOL, this is what I get for being obtuse. What I meant by "should scroll" is that the user should be able to use the mouse to scroll through the text just like you would be able to if the page you are trying to view in a web browser is too big for your resolution. Just so you don't get me wrong, I super appreciate your solution! I just wasn't looking for such a beautifully fancy effect. Now that I have it though, I am going to try it out. I never even thought of something like this and am glad you did. One question though, will this loop through the text or stop when it gets to the end of the lines of text; I only scanned the code and am not very strong in it regardless. Once again, thanks so much for the help Allen, Damon "Allen Browne" wrote: Use the Timer event of the form to replace the Caption of the Label. The example below has 6 lines of text to scroll up in a label named lblScroll that shows 4 lines at a time: Option Compare Database Option Explicit 'Array of the lines to be scrolled in Form_Timer. Private astrScrollText(0 To 5) As String Private Sub Form_Load() 'Purpose: Load the array to use in Form_Timer. astrScrollText(0) = "first line" astrScrollText(1) = "2nd line" astrScrollText(2) = "3rd line" astrScrollText(3) = "4th line" astrScrollText(4) = "5th line" astrScrollText(5) = "last line" End Sub Private Sub Form_Timer() 'Purpose: Assign the text to scroll. Dim i As Integer 'Loop controller. Dim strOut As String 'Output string. Static iIndex As Integer 'Array element index. 'Number of lines high the caption is (zero-based) Const icCaptionHeightLessOne = 3 'Create the output string from the items in the array. For i = 0 To icCaptionHeightLessOne strOut = strOut & astrScrollText((iIndex + i) _ Mod (UBound(astrScrollText) + 1)) & vbCrLf Next 'Assign to the caption of the label. Me.lblScroll.Caption = strOut 'Move the static array index to the next item. iIndex = iIndex + 1 If iIndex UBound(astrScrollText) Then iIndex = LBound(astrScrollText) End If End Sub "Damon" wrote in message ... I have a splash screen that has a field I want to put about 3 pages of text into. The field should only show 3 or 4 lines of text and should scroll. The text will never change, therefore it should not be editable. I have tried to do this but can get it to work. How would you all do this? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formulas dealing with text data | Bagia | Worksheet Functions | 6 | June 20th, 2005 10:29 PM |
Ideas On Producing Envelopes & Labels For Data | RNUSZ@OKDPS | Setting Up & Running Reports | 0 | April 28th, 2005 03:22 PM |
Query for 'confirmation' | rogge | Running & Setting Up Queries | 8 | April 19th, 2005 03:26 PM |
Outline | Renee Hendershott | Page Layout | 2 | December 25th, 2004 02:49 PM |
textbox to normal text | Jack Sons | New Users | 16 | December 5th, 2004 03:44 PM |