Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-14
8
Medium Priority
?
312 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
Independent Software Vendors: 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

604 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