How to do this

  • Thread starter Thread starter Tom
  • Start date Start date
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
 
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]
 
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]
 
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]
 
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]
 
Back
Top