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

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