Adding Multiple Lines Using an Access Text Box

  • Thread starter Thread starter Drummer2004
  • Start date Start date
D

Drummer2004

Hello, I was wondering if anyone knew how to display multiple lines of
data in a Microsoft Access form by using a single text box that is
bound to a table. Any help would be appreciated.
 
Easy: set the form's RecordSource propery to the name of the table or
query; set the textbox's ControlSource property to the name of the
field in that table or query; then - the key thing - set the form's
DefaultView property to Continuous Forms.

HTH,
TC
 
A textbox cannot be bound to a table. So I can think of no way to do what
you are suggesting. You could use a subform to show multiple rows of data
and have a control in the subform bound to a field.

A listbox control can also do this. Or you can use a function to
concatenate all the values into a string and then show that string in a
control. Duane Hookom has a generic function that will concatenate the
values into a string.
 
I have already done those things that you mentioned but only one value
prints out in the textbox. I need to get the data from a table to be
entered on multiple lines within the same form so the continuous form
property doesn't help me much.

Ex. Job1 Number1
Job2 Number2
Job3 Number3
 
That's exactly what a continuous form does.

Make sure you haven't set the detail section heigh so large, that it
can only display a single record at one time!

Surely you don't mean that you need that data in /the same/ textbox?
ie. multiple records in /one/ textbox?

HTH,
TC
 
I just need to get multiple records in the form. If there's anything
better to use besides a text box then I could give that a shot. I just
said a text box because that's what the default in the created database
was.
 
I've told you how to do it. Bind the form to the table. Bind the
textbox to the field. Set the form's DefaultView property to Continuous
Forms. Stand back & watch it happen automagically ...

HTH,
TC
 
This doesn't seem to work for me. I did everything you said but it's
not coming out the way that I would have liked. Record 1 in the
database shows all the information in the Text Box when I scroll rather
than showing the information when i scroll through the records but it
doesn't show all the information at the same time like I need. I'm not
sure what's going on but I guess It's time for some more trial and
error.
 
Sorry, I don't understand what you're saying. Please try to describe
more clearly, what is happening, and what you want to happen instead.

TC
 
Ok, let's see if this describes it a little better. Right now I have a
form that displays data for 1 record. I need to have it so that it
displays the data for all the records on a single form. When I used
continuous forms it would make what was currently in the box disappear
and then display the information for the next record separately but I
need them to be all on one page. Sorry if any of this is unclear,
someone else is telling me the way that they want it done and they are
currently away at the moment. I'm not sure when they'll be back so I
thought I'd seek help in the google groups.
 
Say you put two fields on your form:

[ ] [
]


If the DefaultView property of the form is Single Form, you'll see
this:

[data from rec 1 fld 1] [data from rec 1 fld 2]

If you press PgDn, you'll see the next record showing in the same two
fields on the screen:

[data from rec 2 fld 1] [data from rec 2 fld 2]

But if you set the form's DefaultView property to Continuous forms,
this is what you will see:

[data from rec 1 fld 1] [data from rec 1 fld 2]
[data from rec 2 fld 1] [data from rec 2 fld 2]
[data from rec 3 fld 1] [data from rec 3 fld 2]
[data from rec 4 fld 1] [data from rec 4 fld 2]
[data from rec 5 fld 1] [data from rec 5 fld 2]
[data from rec 6 fld 1] [data from rec 6 fld 2]
etc., for as many records as there are in the file, and as much
space that there is on the screen.

If that's not what you want, please draw a picture (like the above) so
I can understand it.

Cheers,
TC [MVP Access]
 
Ok, this seems good, thank you very much, now all i need to do is mess
around with a few other things and it should work out.
 
Back
Top