?
Solved

Can I wrap field names in a query in Access 2003?

Posted on 2006-11-14
8
Medium Priority
?
309 Views
Last Modified: 2012-08-13
Is it possible to wrap field names in a query in Access 2003?  Someone asked this question about Access 2000, and the answer was no, so I suspect the answer is still no.  

However, the alternative suggested was "Use a form or report with a field property of CanGrow = Yes."  So I tried this on a form and on a report, but the field names still do not wrap.  I think there is some other piece of information that I am missing to make this approach work - does anyone know what that might be?  Thanks.  
0
Comment
Question by:grovduck
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 7

Expert Comment

by:Imoutwest
ID: 17942656
Can you provide an example of what you mean? Where do you want the fields names wrapped?
0
 

Author Comment

by:grovduck
ID: 17943185
Sure thing.  We have some fields in our db that have long names even though they're already abbreviated, e.g PLANT_ASSOC_CODE.  In Excel I could change the height of the first row and enable wrapping to make the names look like this:

PLANT_
ASSOC_
CODE

That way I can still see the entire name of the field, and I can also get more fields to fit on the screen.  I just want to know if there is a way to do that in Access.  
0
 
LVL 7

Expert Comment

by:Imoutwest
ID: 17943274
I will have to check this out, I would think based on the length of the field you should be able to adjust the height of the label that the field name is filling.

Then the issue how to handle the '_'.

I will play will this at home tonight and see if its possible.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 58

Assisted Solution

by:harfang
harfang earned 200 total points
ID: 17943658
Hello grovduck

The column title of a datasheet view is the caption property of the field, or the field name if there is no caption. The caption can contain new line characters, although only the first line of the caption will be shown in datasheet view.

When you create a form or a report, the caption (or, again, just the field name) is copied to a label, attached to each control. That label will display several lines in form view or on a report. In other words, if you see a label with "PLANT_ASSOC_CODE", edit it, delete each underscore and replace it with a new line (Ctrl+[Enter]), and perhaps resize it if needed. That's all there is to it, really.

For that matter, you can just as easily display graphics as column titles on a report or a continuous form.

To have captions wrap automatically when you create a report is an entirely different matter, and would require writing your own "report wizard".

(°v°)
0
 
LVL 7

Accepted Solution

by:
Imoutwest earned 300 total points
ID: 17944166
grovduck,

I think that you're trying to do this the hard way. Access table already provide this functionality for you.

In the design view of the Table:

Caption: the label for the field when used on a form. If you don't enter a value then the field name is used for the form (report).

Therefore PLANT_ASSOC_CODE could be the field name and Plant Association Code code be the caption (label). Without the underscores the field name will automatically wrap to fit the width and height of the label on the form(report).

So there wouldn't be a need to program this in VBA as I think was first suggestion, since when you create the form or report the label can be sized to fit your need.

If this isn't what you're talking about, then I'll still try to do it in vba (just to see if I can), although once your setup your form or report you wouldn't need to change it programically.

Imoutwest
0
 
LVL 7

Expert Comment

by:Imoutwest
ID: 17944173
or are you talking about Datasheet view (like an excel table)?
0
 
LVL 7

Expert Comment

by:Imoutwest
ID: 17944669
I've been doing some reading on this and if your talking about the gray-area in the datasheet the I believe that the answer is sadly "No". However, if your talking about a continous form then there maybe some flexiblity there, but it will not work like a table from Excel.
0
 

Author Comment

by:grovduck
ID: 17949669
Thanks for the info on captions Imoutwest and harfang.

Imoutwest,
Yes, I did want the names to wrap in datasheet view, but it sounds like I would have to create a form or report instead.  Our database is split with the back end on SQL Server and the front end in Access.  So I have created a bunch of queries (views) in SQL Server that I  link to in Access.  These views are listed in the tables tab in Access, and I would like to avoid having to create reports for each view.  So I guess I will either live with the long field names or decide to create reports.  

Thanks to both of you for telling me how to wrap the names in forms and reports.  
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question