How do I create a multi-line text box in Access?

G

Guest

Hello,

I am trying to create a text box that I can type in an address in the
following format:

Address
City, State, Zip

In essence, I want to be able to type the information for the first line,
then hit the enter key to type any additional lines. Can someone please
point me in the right direction as to how I can accomplish this?

Thanks!
Jen
 
G

Guest

create form specific controls for each field
then using the 'on enter event' force go to next field,
at end of it all if u want all three fields as one, than concatenate them
together into the table field
 
G

Guest

Patrick,

I have to admit - everything you said just went over my head! Would you
mind giving me a step-by-step method for how to do what you just described?

Thanks for your quick reply!

Jen
 
G

Guest

create three fields on your form that are just unbound controls, not linked
to any field in your table. place them wherever on the screen (form)

field1

field2

field3

have a 4th field which is linked to the address field in your table and its
source is set to = field1 & ", " & field2 & ", " & field3
ensure that [field1] has the initial focus of the form.
ensure that auto tab is set in the order field1, field2, field3 (look at
sorting and grouping).

this will automatically go from field1 to field2 to field3 when u press
enter (or tab).


then type in the text in the field field1, press enter, tehn text in
field2, press enter, then text in field3, press enter.
 
J

John Vinson

Hello,

I am trying to create a text box that I can type in an address in the
following format:

Address
City, State, Zip

In essence, I want to be able to type the information for the first line,
then hit the enter key to type any additional lines. Can someone please
point me in the right direction as to how I can accomplish this?

I'd strongly suggest keeping these fields separate. You may well want
to sort your addresses by Zip (to get cheaper mailing rates), or
search for all records in a particular city, or the like.

It's very easy to create a Query concatenating these values for
display purposes: for instance, in a Query you can type

CSZ: [City] & ", " & [State] & " " & [Zip]

to get "Parma, ID 83660" on your output.

If you need a multiline textbox (hopefully for some other reason <g>),
view the textbox's properties in form design view. Set its "Enter Key
Behavior" property to "New line in field".

John W. Vinson[MVP]
 

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