Slide to left?

L

Laurel

I have three text boxes in the first line of a directory. Their contents
are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma? All
three text boxes have both "Can Shrink" and "Can Grow" set to "Yes," but
that doesn't seem to do the trick.

TIA
LAS
 
L

Laurel

My problem there is that the last name has to be bolded, and the first names
not. I don't know how to bold just part of a calculation.

Al Campagna said:
Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Laurel said:
I have three text boxes in the first line of a directory. Their contents
are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to "Yes,"
but that doesn't seem to do the trick.

TIA
LAS
 
D

Darrell Childress

What about =Trim([LastName]) This will remove any leading or ending
spaces.
My problem there is that the last name has to be bolded, and the first names
not. I don't know how to bold just part of a calculation.

Al Campagna said:
Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Laurel said:
I have three text boxes in the first line of a directory. Their contents
are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to "Yes,"
but that doesn't seem to do the trick.

TIA
LAS
 
A

Al Campagna

Laurel,
I haven't used this, but Stephan Lebans has an app that should allow
you to mix Bold text and Normal text.
http://www.lebans.com/mixbold-plain.htm
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Laurel said:
My problem there is that the last name has to be bolded, and the first
names not. I don't know how to bold just part of a calculation.

Al Campagna said:
Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Laurel said:
I have three text boxes in the first line of a directory. Their contents
are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to "Yes,"
but that doesn't seem to do the trick.

TIA
LAS
 
D

Duane Hookom

You can use the Print method of the report in the On Format event of the
report section. Assumeing you have two invisible text boxese in the section
that are bound to the LastName and FirstName. This code will bold only the
last name.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.CurrentY = Me.LastName.Top
Me.CurrentX = Me.LastName.Left
Me.FontBold = True
Me.Print Me.LastName
Me.FontBold = False
Me.CurrentY = Me.LastName.Top
Me.CurrentX = Me.CurrentX + 30
Me.Print Me.FirstName
End Sub

--
Duane Hookom
Microsoft Access MVP


Laurel said:
My problem there is that the last name has to be bolded, and the first names
not. I don't know how to bold just part of a calculation.

Al Campagna said:
Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Laurel said:
I have three text boxes in the first line of a directory. Their contents
are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to "Yes,"
but that doesn't seem to do the trick.

TIA
LAS
 
L

Laurel

Well, I was certainly hoping that this approach would work, being the
simplest, but when I put the function on I get #Error instead of the last
name in all rows. The following was cut from the control source and pasted
here. I created it by choosing the function and then choosing the field.
In other words, no typos. What am I doing wrong?

=Trim([Last_Name])

Darrell Childress said:
What about =Trim([LastName]) This will remove any leading or ending
spaces.
My problem there is that the last name has to be bolded, and the first
names not. I don't know how to bold just part of a calculation.

Al Campagna said:
Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have three text boxes in the first line of a directory. Their
contents are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to
"Yes," but that doesn't seem to do the trick.

TIA
LAS
 
D

Duane Hookom

I expect the name of your text box is the name of a field. This would cause
an error.

This solution won't work anyway based on your requirements. A text box will
not shrink horizontally, only vertically.

--
Duane Hookom
Microsoft Access MVP


Laurel said:
Well, I was certainly hoping that this approach would work, being the
simplest, but when I put the function on I get #Error instead of the last
name in all rows. The following was cut from the control source and pasted
here. I created it by choosing the function and then choosing the field.
In other words, no typos. What am I doing wrong?

=Trim([Last_Name])

Darrell Childress said:
What about =Trim([LastName]) This will remove any leading or ending
spaces.
My problem there is that the last name has to be bolded, and the first
names not. I don't know how to bold just part of a calculation.

Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have three text boxes in the first line of a directory. Their
contents are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to
"Yes," but that doesn't seem to do the trick.

TIA
LAS
 
L

Laurel

=[LastName] & ", " & [FirstName]

I took this as the control source from a report in one of the databases Al
Campagna recommended. Why does this work, but trim([Last_Name]) in my case,
doesn't? You can concatenate fields but you can't act on them with
functions? What's the rule?

Duane Hookom said:
I expect the name of your text box is the name of a field. This would cause
an error.

This solution won't work anyway based on your requirements. A text box
will
not shrink horizontally, only vertically.

--
Duane Hookom
Microsoft Access MVP


Laurel said:
Well, I was certainly hoping that this approach would work, being the
simplest, but when I put the function on I get #Error instead of the last
name in all rows. The following was cut from the control source and
pasted
here. I created it by choosing the function and then choosing the field.
In other words, no typos. What am I doing wrong?

=Trim([Last_Name])

Darrell Childress said:
What about =Trim([LastName]) This will remove any leading or ending
spaces.

Laurel wrote:
My problem there is that the last name has to be bolded, and the first
names not. I don't know how to bold just part of a calculation.

Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have three text boxes in the first line of a directory. Their
contents are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the
comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to
"Yes," but that doesn't seem to do the trick.

TIA
LAS
 
A

Al Campagna

Laurel,
Read Duane's previous response...

= Trim(Last_Name) will work... as long as you don't name that control
"Last_Name"

The Name of any calculated field can not match the name of any element
in that calculation.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


Laurel said:
=[LastName] & ", " & [FirstName]

I took this as the control source from a report in one of the databases Al
Campagna recommended. Why does this work, but trim([Last_Name]) in my
case, doesn't? You can concatenate fields but you can't act on them with
functions? What's the rule?

Duane Hookom said:
I expect the name of your text box is the name of a field. This would
cause
an error.

This solution won't work anyway based on your requirements. A text box
will
not shrink horizontally, only vertically.

--
Duane Hookom
Microsoft Access MVP


Laurel said:
Well, I was certainly hoping that this approach would work, being the
simplest, but when I put the function on I get #Error instead of the
last
name in all rows. The following was cut from the control source and
pasted
here. I created it by choosing the function and then choosing the
field.
In other words, no typos. What am I doing wrong?

=Trim([Last_Name])

What about =Trim([LastName]) This will remove any leading or ending
spaces.

Laurel wrote:
My problem there is that the last name has to be bolded, and the
first
names not. I don't know how to bold just part of a calculation.

Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have three text boxes in the first line of a directory. Their
contents are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the
comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to
"Yes," but that doesn't seem to do the trick.

TIA
LAS
 
L

Laurel

Wow!! Thanks so much, and thanks to Mr. Lebans! It saved me so much work
and introduced me to the detail.print event. How handy!!!

Al Campagna said:
Laurel,
I haven't used this, but Stephan Lebans has an app that should allow
you to mix Bold text and Normal text.
http://www.lebans.com/mixbold-plain.htm
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Laurel said:
My problem there is that the last name has to be bolded, and the first
names not. I don't know how to bold just part of a calculation.

Al Campagna said:
Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have three text boxes in the first line of a directory. Their
contents are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to
"Yes," but that doesn't seem to do the trick.

TIA
LAS
 
L

Laurel

Ah, thanks. Of course I read it, but it didn't sink in that "name of text
box" is not the same as "name in text box."

Al Campagna said:
Laurel,
Read Duane's previous response...

= Trim(Last_Name) will work... as long as you don't name that control
"Last_Name"

The Name of any calculated field can not match the name of any element
in that calculation.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


Laurel said:
=[LastName] & ", " & [FirstName]

I took this as the control source from a report in one of the databases
Al Campagna recommended. Why does this work, but trim([Last_Name]) in my
case, doesn't? You can concatenate fields but you can't act on them with
functions? What's the rule?

Duane Hookom said:
I expect the name of your text box is the name of a field. This would
cause
an error.

This solution won't work anyway based on your requirements. A text box
will
not shrink horizontally, only vertically.

--
Duane Hookom
Microsoft Access MVP


:

Well, I was certainly hoping that this approach would work, being the
simplest, but when I put the function on I get #Error instead of the
last
name in all rows. The following was cut from the control source and
pasted
here. I created it by choosing the function and then choosing the
field.
In other words, no typos. What am I doing wrong?

=Trim([Last_Name])

What about =Trim([LastName]) This will remove any leading or ending
spaces.

Laurel wrote:
My problem there is that the last name has to be bolded, and the
first
names not. I don't know how to bold just part of a calculation.

Laurel,
Have you tried concatenation?
= [LastName] & ", " & [FirstName]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have three text boxes in the first line of a directory. Their
contents are:

!Last_Name =", " =fncFirstNames()

How can I get rid of the white space between !Last_Name and the
comma?
All three text boxes have both "Can Shrink" and "Can Grow" set to
"Yes," but that doesn't seem to do the trick.

TIA
LAS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top