Combine two fields

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

Guest

I'm trying to display (combine) two fields on a form using the following:

=Trim([RE] & ", " & [RENO])

But getting an error. #Name?

What am I doing wrong?

Thanks.
 
I'm guessing that the Name of this text box is either RE or RENO?

Change the Name property to something else, such as txtReAndReNo.

Access gets confused if the text box has the same name as a field, but it is
bound to something else.
 
The box that I'm trying to get the two fields to combine in is called
text159. The other two fields are RE and RENO. I have tried some of the
other suggestions but still no luck.

What am I doing wrong?

Allen Browne said:
I'm guessing that the Name of this text box is either RE or RENO?

Change the Name property to something else, such as txtReAndReNo.

Access gets confused if the text box has the same name as a field, but it is
bound to something else.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

rml said:
I'm trying to display (combine) two fields on a form using the following:

=Trim([RE] & ", " & [RENO])

But getting an error. #Name?

What am I doing wrong?

Thanks.
 
Are textboxes for RE and RENO included in the form? If not, you need to add
them - you can stick them anywhere and set the visible property to NO for
visual preference, then use the actual name of these textboxes prefixed by
Me. In other words, if the textbox holding the RENO data is called txtReno,
you would reference it in your code as Me.txtReno.

Hope that clears things a bit,
--
SusanV

rml said:
The box that I'm trying to get the two fields to combine in is called
text159. The other two fields are RE and RENO. I have tried some of the
other suggestions but still no luck.

What am I doing wrong?

Allen Browne said:
I'm guessing that the Name of this text box is either RE or RENO?

Change the Name property to something else, such as txtReAndReNo.

Access gets confused if the text box has the same name as a field, but it
is
bound to something else.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

rml said:
I'm trying to display (combine) two fields on a form using the
following:

=Trim([RE] & ", " & [RENO])

But getting an error. #Name?

What am I doing wrong?

Thanks.
 
Yes, they are on the form.

SusanV said:
Are textboxes for RE and RENO included in the form? If not, you need to add
them - you can stick them anywhere and set the visible property to NO for
visual preference, then use the actual name of these textboxes prefixed by
Me. In other words, if the textbox holding the RENO data is called txtReno,
you would reference it in your code as Me.txtReno.

Hope that clears things a bit,
--
SusanV

rml said:
The box that I'm trying to get the two fields to combine in is called
text159. The other two fields are RE and RENO. I have tried some of the
other suggestions but still no luck.

What am I doing wrong?

Allen Browne said:
I'm guessing that the Name of this text box is either RE or RENO?

Change the Name property to something else, such as txtReAndReNo.

Access gets confused if the text box has the same name as a field, but it
is
bound to something else.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

I'm trying to display (combine) two fields on a form using the
following:

=Trim([RE] & ", " & [RENO])

But getting an error. #Name?

What am I doing wrong?

Thanks.
 
Do you truly need the Trim function? If so, Trim each separately in the
concatenation:

Me.text159 = Trim(Me.txtRE) & ", " & Trim(Me.txtRENO)

This assumes the names of the textboxes for RE and RENO are txtRE and
txtRENO.


rml said:
Yes, they are on the form.

SusanV said:
Are textboxes for RE and RENO included in the form? If not, you need to
add
them - you can stick them anywhere and set the visible property to NO for
visual preference, then use the actual name of these textboxes prefixed
by
Me. In other words, if the textbox holding the RENO data is called
txtReno,
you would reference it in your code as Me.txtReno.

Hope that clears things a bit,
--
SusanV

rml said:
The box that I'm trying to get the two fields to combine in is called
text159. The other two fields are RE and RENO. I have tried some of
the
other suggestions but still no luck.

What am I doing wrong?

:

I'm guessing that the Name of this text box is either RE or RENO?

Change the Name property to something else, such as txtReAndReNo.

Access gets confused if the text box has the same name as a field, but
it
is
bound to something else.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

I'm trying to display (combine) two fields on a form using the
following:

=Trim([RE] & ", " & [RENO])

But getting an error. #Name?

What am I doing wrong?

Thanks.
 

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

Similar Threads


Back
Top