How to do this

T

Tom

Any advice on how to achieve the following would be appreciated.

Using an inherited Access 2002 db the client form has a text box for an
address with the address entered in the format:

The House
The Street

What is required is to leave the form address box as it is but that address
field in a report to be in the format:

The House, The Street

Thanks in advance for advice
 
M

Marshall Barton

Tom said:
Any advice on how to achieve the following would be appreciated.

Using an inherited Access 2002 db the client form has a text box for an
address with the address entered in the format:

The House
The Street

What is required is to leave the form address box as it is but that address
field in a report to be in the format:

The House, The Street


Set the report's text box to an expression like:

=[The House] & ", " & [The Street]
 
T

Tom

HI Marsh

A possible misunderstanding

The House
The Street

are in the same text box

Tom
Marshall Barton said:
Tom said:
Any advice on how to achieve the following would be appreciated.

Using an inherited Access 2002 db the client form has a text box for an
address with the address entered in the format:

The House
The Street

What is required is to leave the form address box as it is but that
address
field in a report to be in the format:

The House, The Street


Set the report's text box to an expression like:

=[The House] & ", " & [The Street]
 
D

Douglas J. Steele

And how are they getting there? Is the ControlSource for the textbox
something like =[The House] & vbCrLf & [The Street], or is it bound to a
single field? If the former, change it as per Marsh's advice. If the latter,
is the Recordset for the form a query that has a computed field that
concatenates the two fields as above, or is the data actually stored in the
table as two separate lines of text? If the former, change the query. If the
latter, try changing the ControlSource for the textbox to something like
=Replace([AddressField], vbCrLf, ", ")


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Tom said:
HI Marsh

A possible misunderstanding

The House
The Street

are in the same text box

Tom
Marshall Barton said:
Tom said:
Any advice on how to achieve the following would be appreciated.

Using an inherited Access 2002 db the client form has a text box for an
address with the address entered in the format:

The House
The Street

What is required is to leave the form address box as it is but that
address
field in a report to be in the format:

The House, The Street


Set the report's text box to an expression like:

=[The House] & ", " & [The Street]
 
T

Tom

Thanks Doug

The replace route does exactly whats required

Tom
Douglas J. Steele said:
And how are they getting there? Is the ControlSource for the textbox
something like =[The House] & vbCrLf & [The Street], or is it bound to a
single field? If the former, change it as per Marsh's advice. If the
latter,
is the Recordset for the form a query that has a computed field that
concatenates the two fields as above, or is the data actually stored in
the
table as two separate lines of text? If the former, change the query. If
the
latter, try changing the ControlSource for the textbox to something like
=Replace([AddressField], vbCrLf, ", ")


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Tom said:
HI Marsh

A possible misunderstanding

The House
The Street

are in the same text box

Tom
Marshall Barton said:
Tom wrote:

Any advice on how to achieve the following would be appreciated.

Using an inherited Access 2002 db the client form has a text box for an
address with the address entered in the format:

The House
The Street

What is required is to leave the form address box as it is but that
address
field in a report to be in the format:

The House, The Street


Set the report's text box to an expression like:

=[The House] & ", " & [The Street]
 

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