Concatenate Autonumber with String

T

Tom

In a report, I want to concatenate an autonumber field with a string. So,
if Autonumber is "1", I want to display in an unbound field: Resource
Request: 1

I tried the following but it gives me an error: ="Resource Request: " &
[NameOfAutonumberField]

Any suggestions,
Tom
 
F

fredg

In a report, I want to concatenate an autonumber field with a string. So,
if Autonumber is "1", I want to display in an unbound field: Resource
Request: 1

I tried the following but it gives me an error: ="Resource Request: " &
[NameOfAutonumberField]

Any suggestions,
Tom

Your expression looks good to me.
Make sure the name of this control is not "NameOfAutonumberField".
 
T

Tom

It says: #Error

--
Thanks,
Tom


Ken Snell said:
What's the error that you get?

--

Ken Snell
<MS ACCESS MVP>

Tom said:
In a report, I want to concatenate an autonumber field with a string. So,
if Autonumber is "1", I want to display in an unbound field: Resource
Request: 1

I tried the following but it gives me an error: ="Resource Request: " &
[NameOfAutonumberField]

Any suggestions,
Tom
 
T

Tom

No, actually the control still has its default value... Text94

For testing purposes, I tried the following: concatenate AutoNo and other
text field, as shown below:

[TrackingNumber] & " - " & [Division]

.... the result is: 1 - C23

now I tried:

"Record No is: " & [TrackingNumber] & " - " & [Division]

.... results in: #Error.

This doesn't make sense to me... any thoughts?

--
Thanks,
Tom


fredg said:
In a report, I want to concatenate an autonumber field with a string.
So,
if Autonumber is "1", I want to display in an unbound field: Resource
Request: 1

I tried the following but it gives me an error: ="Resource Request: " &
[NameOfAutonumberField]

Any suggestions,
Tom

Your expression looks good to me.
Make sure the name of this control is not "NameOfAutonumberField".
 
B

Bill

Tom,
Here is some code I used to wrap text around a formatted date.
=("Payment Due By " & DateAdd("y",+24,[enddate]) & Chr(13) & Chr(10) &
"Thank You")
The Payment Due By precedes the datefield and the Thank You is after the
carriage return.
Your code might work like this.........
=("Record No is: " & [TrackingNumber] & " - " & [Division])
Hope it helps.
Bill
Tom said:
No, actually the control still has its default value... Text94

For testing purposes, I tried the following: concatenate AutoNo and other
text field, as shown below:

[TrackingNumber] & " - " & [Division]

... the result is: 1 - C23

now I tried:

"Record No is: " & [TrackingNumber] & " - " & [Division]

... results in: #Error.

This doesn't make sense to me... any thoughts?

--
Thanks,
Tom


fredg said:
In a report, I want to concatenate an autonumber field with a string.
So,
if Autonumber is "1", I want to display in an unbound field: Resource
Request: 1

I tried the following but it gives me an error: ="Resource Request: " &
[NameOfAutonumberField]

Any suggestions,
Tom

Your expression looks good to me.
Make sure the name of this control is not "NameOfAutonumberField".
 
K

Ken Snell [MVP]

That suggests that there are no records, and therefore no value for the
NameOfAutoNumberField -- or that NameOfAutoNumberField is not a field in the
report's RecordSource.

--

Ken Snell
<MS ACCESS MVP>

Tom said:
It says: #Error

--
Thanks,
Tom


Ken Snell said:
What's the error that you get?

--

Ken Snell
<MS ACCESS MVP>

Tom said:
In a report, I want to concatenate an autonumber field with a string.
So, if Autonumber is "1", I want to display in an unbound field:
Resource Request: 1

I tried the following but it gives me an error: ="Resource Request: "
& [NameOfAutonumberField]

Any suggestions,
Tom
 
Top