Full Version: reporrts--adding text to a text box's data control source
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
mjschukas
i have a name field that pulls back the salesman's name (works well)...

and in the text box on a report, i would like to add: "the name of the salesman is: " and then the [salesman name] field...?

i keep getting an error...???

thank you.
MattJ
= "The Name of the Salesman is : " & [SalesmanNameField]


HTH
Matt
mjschukas
thankyou...

in the meantime, i've tried another textbox and field and i typed in:

="the invoice number is: " & [invoice]

and when i run the report, i get an #error...?

???

thank you.
MattJ
Is invoice an attribute included in the report's recordsource?
mjschukas
invoice is a field name that initially was in the data source of the textbox...

thank you.
justAnewGuy
mjschukas,

To answer your question, somebody already asked about records and #Error messages.
http://www.utteraccess.com/forums/showflat...1409616&Zp=

Now, if somebody could help me with the #Error messages I get in forms? Whenever I go make a new record, I have the following control text for a field:
=returnPres([DesignPres])

This is a simple function. DesignPres is defined as a double in the table, and here is the returnPres function:

Public Function returnPres(ByVal num As Double) As String
If num > -14.7 Then
returnPres = CStr(num) & " PSIG"
Else
returnPres = "--"
End If
End Function

The function works fine whenever I already have a record for [DesignPres]. I have all sorts of functions throughout all my forms, and I get annoyed whenever I see a "#Error" message when I go make a new record with my forms. The user enters [DesignPres] in another form, and I have it display in several other forms as a reference. Help?
MattJ
I've seen this before - try creating a new textbox control and entering the expression again.

Matt
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.