Text Box with Word & Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone! I am working on a report. Right now I have a text box that pulls
from a field called LastName from a query. Right now it just says our
doctor's last names. Example: Johnson. However, I would like it to say Dr.
Johnson. How do I do this? I tried putting ="Dr. " & [LastName] but it didn't
work. Any help would be much appreciated!

Thanks,
Tandy
 
I think it did work. How do you define "didn't work"?

Did you change the name of the text box to something like "txtDrName"?
 
Hi Duane! By "didn't work" I mean that my report shows #Error. The text box
is name LastName and the control source was originally LastName from my
query. When I changed the control source to ="Dr. " & [LastName] it gives me
the #Error.
Thanks for you help,
Tandy

Duane Hookom said:
I think it did work. How do you define "didn't work"?

Did you change the name of the text box to something like "txtDrName"?

--
Duane Hookom
MS Access MVP
--

Tandy said:
Hi everyone! I am working on a report. Right now I have a text box that
pulls
from a field called LastName from a query. Right now it just says our
doctor's last names. Example: Johnson. However, I would like it to say Dr.
Johnson. How do I do this? I tried putting ="Dr. " & [LastName] but it
didn't
work. Any help would be much appreciated!

Thanks,
Tandy
 
Oh ok! I just made a new, separate text box with my ="Dr. " & [LastName] and
it works! Thank you for your help!
Tandy

Duane Hookom said:
I think it did work. How do you define "didn't work"?

Did you change the name of the text box to something like "txtDrName"?

--
Duane Hookom
MS Access MVP
--

Tandy said:
Hi everyone! I am working on a report. Right now I have a text box that
pulls
from a field called LastName from a query. Right now it just says our
doctor's last names. Example: Johnson. However, I would like it to say Dr.
Johnson. How do I do this? I tried putting ="Dr. " & [LastName] but it
didn't
work. Any help would be much appreciated!

Thanks,
Tandy
 
All you needed to do was change the name of the text box as I suggested. Can
you see the issue with a text box named LastName and a field named LastName?
Your control doesn't understand if LastName refers to itself or to the field
named LastName.

--
Duane Hookom
MS Access MVP
--

Tandy said:
Oh ok! I just made a new, separate text box with my ="Dr. " & [LastName]
and
it works! Thank you for your help!
Tandy

Duane Hookom said:
I think it did work. How do you define "didn't work"?

Did you change the name of the text box to something like "txtDrName"?

--
Duane Hookom
MS Access MVP
--

Tandy said:
Hi everyone! I am working on a report. Right now I have a text box that
pulls
from a field called LastName from a query. Right now it just says our
doctor's last names. Example: Johnson. However, I would like it to say
Dr.
Johnson. How do I do this? I tried putting ="Dr. " & [LastName] but it
didn't
work. Any help would be much appreciated!

Thanks,
Tandy
 
Hey Duane! Yes, I see that now. I will have to remember that for the future.
Thank you for your help. My report is done and looks greats!
Thanks again,
Tandy

Duane Hookom said:
All you needed to do was change the name of the text box as I suggested. Can
you see the issue with a text box named LastName and a field named LastName?
Your control doesn't understand if LastName refers to itself or to the field
named LastName.

--
Duane Hookom
MS Access MVP
--

Tandy said:
Oh ok! I just made a new, separate text box with my ="Dr. " & [LastName]
and
it works! Thank you for your help!
Tandy

Duane Hookom said:
I think it did work. How do you define "didn't work"?

Did you change the name of the text box to something like "txtDrName"?

--
Duane Hookom
MS Access MVP
--

Hi everyone! I am working on a report. Right now I have a text box that
pulls
from a field called LastName from a query. Right now it just says our
doctor's last names. Example: Johnson. However, I would like it to say
Dr.
Johnson. How do I do this? I tried putting ="Dr. " & [LastName] but it
didn't
work. Any help would be much appreciated!

Thanks,
Tandy
 
Back
Top