Julie said:
Thank you for that but how do I ensure that there is a carriage return at
then end of the width of the text box. The other question is how can I view
all the information that may be in the text box because as it is, I can only
see the first line and I don't want this massive memo box on my form. I
would sooner have something like the looks of a combo box but didn't know if
I could make a combo box for the memo.
One thing you can do with the control on the form is to set the "Can
Shrink" and "Can Grow" properties. If you do this, the control (e.g.
text box) will adjust as needed to display what's there, and will
disappear altogether under some circumstances if there is nothing in the
field (if you don't like this, don't use "Can Shrink").
The only way to put newlines into your memo field that I can think of is
to use VBA, which you've already ruled out, and it would be messy anyway.
However, you're going about this ALL WRONG! Your table design "violates
first normal form". That's jargon for saying that stuffing multiples of
a "thing" (in this case a user comment) into a single field is
recognised as bad practice which will make your life unnecessarily
difficult. It takes a bit of getting used to, but the "relational
database" way of dealing with data like this is to create a separate
record for each comment. That suggests a new table, "tblComments",
which contains the primary key (unique identifier) of whatever entity
your users are commenting on, optional fields (like the primary key of
the user making the comment, and the date) and the text of the comment
itself. Easy to delete one of those! A rule of thumb: if you have a
"list", think records, never commas or newlines!
An example. Say you have a range of food products, and you need to
record the ingredients of each. Some may have only one or two
ingredients; complex processed meals may have scores. So, you'd have
one table for the product, with a unique identifier ("primary key"), the
name of the product, and maybe other fields for relevant information
like price. Then you'd have a table of Ingredients, with two essential
fields: one would have the unique identifier of the product, and one
would identify the ingredient. So for a complex product, the
Ingredients table would have many records containing that product's
unique identifier (as a "foreign key") giving a reference to the main
product record.
Many (most!) people would go further, and have the Ingredients table
contain only the Ingredient name and a unique identifier for the
Ingredient. Then you'd have a further "associative" table (you could
call it "tblRecipe") with two fields: the unique-identifier of the
product and the unique-identifier of the Ingredient (and possibly
further fields, like maybe the date that Ingredient started being used
in that Product, or something to identify the percentage). So, if you
wanted to know what ingredients were in "Curried Beans", you'd simply
query tblRecipe for records containing the unique-identifier of "Curried
Beans".
I think you urgently need to put some study into what's called
"normalisation" - the collective experience of generations on how to
divide up data into tables so as to make it easy and flexible to work
with. You've got this far, so you won't find it that hard. Time spent
reorganising your tables will pay huge dividends.
This is the third time I've replied to one of your posts recently. It's
always useful to know how you get on - whether things are clear.
Phil, London