Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate
several RTB controls into a single RTF file. Sometimes two strings will be
side-by-side; other times they need to be separated by a hard return.
For example, say I have the following 4 RTB controls in my form:
RTB1 = "abcd"
RTB2 = "efgh"
RTB3 = "ijkl"
RTB4 = "mnop"
The resulting RTF document might need to look like this:
abcdefgh
ijkl
mnop
Using the SaveFile method works great for a single RTB control. But how can
I concatenate the contents of two or more controls into a single RTF file,
and how can I insert hard returns between sets of text?
Thanks!
Neil 10 3466
On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote:
Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate
several RTB controls into a single RTF file. Sometimes two strings will be
side-by-side; other times they need to be separated by a hard return.
For example, say I have the following 4 RTB controls in my form:
RTB1 = "abcd"
RTB2 = "efgh"
RTB3 = "ijkl"
RTB4 = "mnop"
The resulting RTF document might need to look like this:
abcdefgh
ijkl
mnop
Using the SaveFile method works great for a single RTB control. But how can
I concatenate the contents of two or more controls into a single RTF file,
and how can I insert hard returns between sets of text?
Thanks!
Neil
In this case, and assuming the format is constant:
wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf &
RTB4
vbCrLF is the VB constant shorthand for the carriage return/linefeed
combination.
You could also concatenate 'Chr$(13) & Chr$(10)' instead of the
constant. If the structure is variable, the actual concatenation
sequence will be more complex but usually solvable. The inline 'If'
statement is quite useful for these puzzles.
iif([something],"concatenat e" & "some things","concat enate" & "other"
& "things")
Lucks to yas!
Ron King of Chi
No, we're dealing with rich textboxes here. Each box is a self-contained RTF
statement. You can't concatenate them with vbCrLf.
"King Ron" <Ki************ ***@covad.netwr ote in message
news:11******** **************@ m36g2000hse.goo glegroups.com.. .
On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote:
>Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be separated by a hard return.
For example, say I have the following 4 RTB controls in my form:
RTB1 = "abcd" RTB2 = "efgh" RTB3 = "ijkl" RTB4 = "mnop"
The resulting RTF document might need to look like this:
abcdefgh
ijkl
mnop
Using the SaveFile method works great for a single RTB control. But how can I concatenate the contents of two or more controls into a single RTF file, and how can I insert hard returns between sets of text?
Thanks!
Neil
In this case, and assuming the format is constant:
wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf &
RTB4
vbCrLF is the VB constant shorthand for the carriage return/linefeed
combination.
You could also concatenate 'Chr$(13) & Chr$(10)' instead of the
constant. If the structure is variable, the actual concatenation
sequence will be more complex but usually solvable. The inline 'If'
statement is quite useful for these puzzles.
iif([something],"concatenat e" & "some things","concat enate" & "other"
& "things")
Lucks to yas!
Ron King of Chi
On Jun 7, 7:08 pm, "Neil" <nos...@nospam. netwrote:
No, we're dealing with rich textboxes here. Each box is a self-contained RTF
statement. You can't concatenate them with vbCrLf.
"King Ron" <KingRonPoindex ...@covad.netwr ote in message
news:11******** **************@ m36g2000hse.goo glegroups.com.. .
On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote:
Using the MS Rich Textbox Control 6.0 in Access 2000, I need to
concatenate
several RTB controls into a single RTF file. Sometimes two strings will
be
side-by-side; other times they need to be separated by a hard return.
For example, say I have the following 4 RTB controls in my form:
RTB1 = "abcd"
RTB2 = "efgh"
RTB3 = "ijkl"
RTB4 = "mnop"
The resulting RTF document might need to look like this:
abcdefgh
ijkl
mnop
Using the SaveFile method works great for a single RTB control. But how
can
I concatenate the contents of two or more controls into a single RTF
file,
and how can I insert hard returns between sets of text?
Thanks!
Neil
In this case, and assuming the format is constant:
wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf &
RTB4
vbCrLF is the VB constant shorthand for the carriage return/linefeed
combination.
You could also concatenate 'Chr$(13) & Chr$(10)' instead of the
constant. If the structure is variable, the actual concatenation
sequence will be more complex but usually solvable. The inline 'If'
statement is quite useful for these puzzles.
iif([something],"concatenat e" & "some things","concat enate" & "other"
& "things")
Lucks to yas!
Ron King of Chi
Well that water quickly got up over my head...
I'll have to play with one o them a lil' bit and get back atchas.
R, KOC
What it is this group, and why is it appearing on my computer?
Yvonne Michele Anderson yv***********@n oos.fr
On 11/06/07 23:59, in article 11************* *******@q75g200 0h...legrou ps.com, "King Ron"
<Ki************ ***@covad.netwr ote:
On Jun 7, 7:08 pm, "Neil" <nos...@nospam. netwrote:
>No, we're dealing with rich textboxes here. Each box is a self-contained RTF statement. You can't concatenate them with vbCrLf.
"King Ron" <KingRonPoindex ...@covad.netwr ote in message
news:11******* *************** @m36g2000hse.go oglegroups.com. ..
>>On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote: Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenat e several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be separated by a hard return.
>>>For example, say I have the following 4 RTB controls in my form:
>>>RTB1 = "abcd" RTB2 = "efgh" RTB3 = "ijkl" RTB4 = "mnop"
>>>The resulting RTF document might need to look like this:
>>>abcdefgh
>>>ijkl
>>>mnop
>>>Using the SaveFile method works great for a single RTB control. But how can I concatenate the contents of two or more controls into a single RTF file, and how can I insert hard returns between sets of text?
>>>Thanks!
>>>Neil
>>In this case, and assuming the format is constant:
>>wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf & RTB4
>>vbCrLF is the VB constant shorthand for the carriage return/linefeed combination .
>>You could also concatenate 'Chr$(13) & Chr$(10)' instead of the constant. If the structure is variable, the actual concatenation sequence will be more complex but usually solvable. The inline 'If' statement is quite useful for these puzzles.
>>iif([something],"concatenat e" & "some things","concat enate" & "other" & "things")
>>Lucks to yas!
>>Ron King of Chi
Well that water quickly got up over my head...
I'll have to play with one o them a lil' bit and get back atchas.
R, KOC
Why don't you tell us. None of us have access to your computer, so we can't
tell you why the things that are on your computer are on your computer.
"Yvonne Anderson" <yv***********@ noos.frwrote in message
news:C2******** *************** **@noos.fr...
What it is this group, and why is it appearing on my computer?
Yvonne Michele Anderson yv***********@n oos.fr
On 11/06/07 23:59, in article 11************* *******@q75g200 0h...legrou ps.com, "King Ron"
<Ki************ ***@covad.netwr ote:
>On Jun 7, 7:08 pm, "Neil" <nos...@nospam. netwrote:
>>No, we're dealing with rich textboxes here. Each box is a self-contained RTF statement. You can't concatenate them with vbCrLf.
"King Ron" <KingRonPoindex ...@covad.netwr ote in message
news:11****** *************** *@m36g2000hse.g ooglegroups.com ...
On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote: Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatena te several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be separated by a hard return.
For example, say I have the following 4 RTB controls in my form:
RTB1 = "abcd" RTB2 = "efgh" RTB3 = "ijkl" RTB4 = "mnop"
The resulting RTF document might need to look like this:
abcdefgh
ijkl
mnop
Using the SaveFile method works great for a single RTB control. But how can I concatenate the contents of two or more controls into a single RTF file, and how can I insert hard returns between sets of text?
Thanks!
Neil
In this case, and assuming the format is constant:
wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf & RTB4
vbCrLF is the VB constant shorthand for the carriage return/linefeed combinatio n.
You could also concatenate 'Chr$(13) & Chr$(10)' instead of the constant. If the structure is variable, the actual concatenation sequence will be more complex but usually solvable. The inline 'If' statement is quite useful for these puzzles.
iif([something],"concatenat e" & "some things","concat enate" & "other" & "things")
Lucks to yas!
Ron King of Chi
Well that water quickly got up over my head...
I'll have to play with one o them a lil' bit and get back atchas.
R, KOC
If you do not want to work directly with the RTF encoding then simply
cocatenate the values of the existing RTF controls into a new RTF control.
Use the Selxxx props/methods to select the complete contents of one control,
grab the RTF Selection, set your insertion point within the new RTF control,
set the SelText prop of the new control, and so on.
Add another control that contains nothing but a carriage retunr and follow
the same logic as above to select and copy the contents into the new
cocatenated RTF control.
--
HTH
Stephen Lebans http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"King Ron" <Ki************ ***@covad.netwr ote in message
news:11******** ************@q7 5g2000hsh.googl egroups.com...
On Jun 7, 7:08 pm, "Neil" <nos...@nospam. netwrote:
>No, we're dealing with rich textboxes here. Each box is a self-contained RTF statement. You can't concatenate them with vbCrLf.
"King Ron" <KingRonPoindex ...@covad.netwr ote in message
news:11******* *************** @m36g2000hse.go oglegroups.com. ..
On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote: Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be separated by a hard return.
>For example, say I have the following 4 RTB controls in my form:
>RTB1 = "abcd" RTB2 = "efgh" RTB3 = "ijkl" RTB4 = "mnop"
>The resulting RTF document might need to look like this:
>abcdefgh
>ijkl
>mnop
>Using the SaveFile method works great for a single RTB control. But how can I concatenate the contents of two or more controls into a single RTF file, and how can I insert hard returns between sets of text?
>Thanks!
>Neil
In this case, and assuming the format is constant:
wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf &
RTB4
vbCrLF is the VB constant shorthand for the carriage return/linefeed
combination.
You could also concatenate 'Chr$(13) & Chr$(10)' instead of the
constant. If the structure is variable, the actual concatenation
sequence will be more complex but usually solvable. The inline 'If'
statement is quite useful for these puzzles.
iif([something],"concatenat e" & "some things","concat enate" & "other"
& "things")
Lucks to yas!
Ron King of Chi
Well that water quickly got up over my head...
I'll have to play with one o them a lil' bit and get back atchas.
R, KOC
Thanks, Stephen! That was just what I was looking for. Being a newbie with
RTFs, I didn't think to use the Sel properties. That worked great. Only one
problem.
When I concatenate two pieces of text that are supposed to be in the same
paragraph, side by side, they end up with a hard return between them.
For example, RTF1="abc" and RTF2="def", and I want the result to be
"abcdef". Instead I get:
abc
def
Here's my code (rtfCompilation is the control being used for concatenation):
Me.rtfCompilati on = ""
Me.rtf1.SelStar t = 0
Me.rtf1.selleng th = Len(Me.rtf1)
Me.rtfCompilati on.SelText = Me.rtf1.SelRTF
Me.rtf2.SelStar t = 0
Me.rtf2.selleng th = Len(Me.rtf2)
Me.rtfCompilati on.SelStart = Len(Me.rtfCompi lation)
Me.rtfCompilati on.SelText = Me.rtf2.SelRTF
I also tried the above with Me.rtfCompilati on.SelStart =
Len(Me.rtfCompi lation) + 1. Results were the same.
Thanks!
Neil
"Stephen Lebans" <ForEmailGotoMy .WebSite.-WWWdotlebansdot ...@linvalid.co m>
wrote in message news:46******** **************@ news.aliant.net ...
If you do not want to work directly with the RTF encoding then simply
cocatenate the values of the existing RTF controls into a new RTF control.
Use the Selxxx props/methods to select the complete contents of one
control, grab the RTF Selection, set your insertion point within the new
RTF control, set the SelText prop of the new control, and so on.
Add another control that contains nothing but a carriage retunr and follow
the same logic as above to select and copy the contents into the new
cocatenated RTF control.
--
HTH
Stephen Lebans http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"King Ron" <Ki************ ***@covad.netwr ote in message
news:11******** ************@q7 5g2000hsh.googl egroups.com...
>On Jun 7, 7:08 pm, "Neil" <nos...@nospam. netwrote:
>>No, we're dealing with rich textboxes here. Each box is a self-contained RTF statement. You can't concatenate them with vbCrLf.
"King Ron" <KingRonPoindex ...@covad.netwr ote in message
news:11****** *************** *@m36g2000hse.g ooglegroups.com ...
On Jun 7, 11:49 am, "Neil" <nos...@nospam. netwrote: Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be separated by a hard return.
For example, say I have the following 4 RTB controls in my form:
RTB1 = "abcd" RTB2 = "efgh" RTB3 = "ijkl" RTB4 = "mnop"
The resulting RTF document might need to look like this:
abcdefgh
ijkl
mnop
Using the SaveFile method works great for a single RTB control. But how can I concatenate the contents of two or more controls into a single RTF file, and how can I insert hard returns between sets of text?
Thanks!
Neil
In this case, and assuming the format is constant:
wkText = RTB1 & RTB2 & vbCrLf & vbCrLf & RTB3 & vbCrLf & vbCrLf & RTB4
vbCrLF is the VB constant shorthand for the carriage return/linefeed combination.
You could also concatenate 'Chr$(13) & Chr$(10)' instead of the constant. If the structure is variable, the actual concatenation sequence will be more complex but usually solvable. The inline 'If' statement is quite useful for these puzzles.
iif([something],"concatenat e" & "some things","concat enate" & "other" & "things")
Lucks to yas!
Ron King of Chi
Well that water quickly got up over my head...
I'll have to play with one o them a lil' bit and get back atchas.
R, KOC
"Yvonne Anderson" <yv***********@ noos.frwrote
What it is this group, and why is it appearing on my computer?
This is a USENET newsgroup devoted to questions and answers about Microsoft
Access.
The only reason I can think that it would be appearing on your computer is
that you, or someone else, selected it in your newsreader software. If you
are in the habit of logging on to your computer and then walking away, that
could explain it.
But, in any case, if you open your newsreader and take appropriate steps to
unsubscribe, it should go away.
Larry Linson
Microsoft Access MVP
You're a better person than me, Larry. :-)
"Larry Linson" <bo*****@localh ost.notwrote in message
news:fKMbi.3563 $or4.1434@trndd c06...
"Yvonne Anderson" <yv***********@ noos.frwrote
>What it is this group, and why is it appearing on my computer?
This is a USENET newsgroup devoted to questions and answers about
Microsoft Access.
The only reason I can think that it would be appearing on your computer is
that you, or someone else, selected it in your newsreader software. If
you are in the habit of logging on to your computer and then walking away,
that could explain it.
But, in any case, if you open your newsreader and take appropriate steps
to unsubscribe, it should go away.
Larry Linson
Microsoft Access MVP This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bala |
last post by:
hi there
the senario - an A2k application is distributed as a mdb to various
users. they are not packaged. rich textbox is being used in one form.
requirement - in some of the user's machine (am not sure which version
of windows they have) when the application is run, the application
error's out due to the absense of rich textbox. what i...
|
by: Neil |
last post by:
Is there an editable RTF textbox control which allows the user to apply
bold, italic, etc.? I tried the Microsoft Rich Textbox Control, but there
doesn't seem to be a way to allow the user to change the formatting while
typing text. Is there such a beast?
Thanks,
Neil
|
by: Hazzard |
last post by:
I just realized that the code I inherited is using all asp.net server
controls (ie. webform controls) and when I try to update textboxes on the
client side, I lose the new value of the textbox when submitting the form to
update the database. The server doesn't have the client side value any more.
It seems to me that as I begin to write the...
|
by: GY2 |
last post by:
I want to step through the rows returned by my DataView, extract some values
from some of its columns and append them as separate lines to the text of
various rich textbox
controls while possibly changing the color of each new line.
It seems as though I should use the Lines property but can't find a good
example. Below is my attempt to do...
|
by: Neil |
last post by:
I'm using the MS Rich Textbox control (6.0 - SP4) in an MS Access 2000 MDB,
on a tab control with 4 tabs. Each tab has 4-8 rich textboxes, which are
bound to memo fields.
Frequently, when I click on a tab to move there, an image of one of the RT
controls on that tab appears in the upper left corner of the screen. The
form and the tab...
| |
by: Neil |
last post by:
Just found out that the Microsoft Rich Textbox does not support full text
justification, since it's based on Version 1.0 of the RichEdit Window Class,
and full text justification is only available in versions 3.0 or later of
the class.
However, also just found out that the new Rich Text property in Access 2007
ALSO does not support full...
|
by: Neil |
last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text
feature does not support: a) full text justification; b) programmatic
manipulation.
I was hoping that someone might know one way or the other whether that was
true or not, or could point me to an article or help text that would. What I
have seen so far online and in...
|
by: Neil |
last post by:
I'm having problems with an implementation of the Microsoft Rich Textbox
Control 6.0 in an Access 2000 database. The form with the controls works
fine except on two computers. On these computers, the form will only open if
the MDB file is in an uncompiled state (implying that that computer has to
be the one to compile it). Otherwise, the form...
|
by: Neil |
last post by:
I am having trouble using long dashes (Em dashes) with the Microsoft Rich
Textbox 6.0 control. Whenever I paste them in, the control converts them to
hyphens. I have found it is the same with the Total Access Memo control by
FMS. I have even inserted the \emdash code directly into the rich text code,
but with the same results.
Searching...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |