Wrap text in the Header columns

I'm new to MS Access and this forum. This may be a silly question but I cannot find answer anywhere: can I wrap text in the header columns of a table in Datasheet view as shown in the attachment?

BTW, I cannot make the column width wider because I want to display as many columns as possible.

Any help would be great appreciated. Thanks.

Post your answer or comment

comments powered by Disqus
I have a report that displays records on a monthly basis. The report is based on a query, and the specific month is selected as a number (1-12) by using the following:

Field: Month([ProtocolDate])
Criteria: [Choose a month from 1-12]

So, if I want the report to display only the Protocols for January, then I select 1 when prompted.

I'm attempting to display the month (selected as a number via query) as text in the Header. For example, when I select 1 to display the report for January, I would like for 'January' to be displayed in the Header.

I have an unbound Textbox in the header, but I'm not sure how to get it to display the month selected. I have tried =Month([ProtocolDte]) in the control for the textbox, but it will only display the number of the month.

This is probably an easy fix, but my inexperience is not allowing me to figure it out. Thanks in advance for any help.


Good Afternoon Everyone,

I am currently serving as a Peace Corps Volunteer at my host countries Department of Education. The goal is to construct a database encompassing every teacher's information throughout the region. The Form I am currently working on is a search form.

My goal is to create an advanced Teacher search form. The user would search for teacher records based on all the fields in the teacher table (I.e. if the teachers table had first name, last name, date of birth, ID number, address, current school employed,ect. as fields. then the form would allow you to do a search using any combination of those fields and display the results. these results would be able to be turned into a report and printed.

I have made some progress with this, by using the database search designed by Allen Browne (id post the link, but i need 10 posts to do it)

I have it working where the information gathered from the unbound text boxes (First Name and Last Name) are used to build a query that is passed to the filter.

So, the next step would be for me to expand upon this concept by adding the rest of the unbound text boxes/combo boxes in the header section. each control being used to enter search criteria for a different field from my Teachers Table. this would give me about 20 different text boxes/combo boxes in the header section. and have the same 20 fields be going horizontally in the detail section (imagine a datasheet view's layout of records)

plugging in the controls in the header section looks right in the design view, as all the controls are displayed and the records in the details section are visible.

However, when i switch to form view, I am not able to see all of the controls in the header section, and the details section is all but disappeared...there isnt even a way to scroll down to view the rest of the information which was visible when i was in design mode.

I am not sure what i am doing wrong, or if there is some property that is disabled. but in a nutshell i cant view the contents of my form once the controls go down the page to a certain point.

is there maybe an easier way to accomplish this search that i just havnt tried yet? or is my dilemma fixable? (as i am still a beginner to the process). any suggestions would be super helpful, and if I have left a piece of information out PLEASE tell me so i can give you more specifics.

Thanks guys for even reading it to this point lol.

I have a textbox control and it has a specified width. But if the number of characters are more to display in one line, then I want to wrap the text in the textbox.
The text that appears in the textbox is determined at runtime.

Is there a way to do that??


I generate a pivot table from a simple table databse and one of the memo field contains a fair amount of text and when I try to print my pivot table, it prints over 2-3 pages. Is there a way to wrap text in an Access Pivot Table?


I am trying to find out if you can wrap text in a combo box? I have multiple selections that I am chosing to insert into my form but some of the verbage is cut off. Is there a way to wrap the text so that it shows all the information selected?

Would anyone happen to know how to wrap text in the Expression Builder box
in Access? In the 97 version, it automatically would wrap the text of
the formulas I built. In the 2002 version, it won't wrap.


Is there an easy way to put some descriptive text inside a textbox, have it grayed out, and when you enter text in the box, it overwrites this text? For instance, I have an Issues database. In the text field, I want to put the text as follows: Enter your issue here. Then when they type in that field, it overwrites that text with whatever they enter. Hope that makes sense.

I'm trying to use two controls in the Header and have a continuous form show up in the Details based on the selections in the header.
The DB has to do with multiple gas and electric meters in different units in a property. In the Header I have drop down boxes specifying Unit and Meter type, in the details I want a list of all meters associated with that Unit and Meter type so I can enter the new meter readings and calculate the usages for each meter. Any thoughts??

Dear Experts,

i want to set wrap text in my report on one field how can i do?

Hi @ all!

I have a question

Id like to export a MS Acc 2007 Table into a txt file
To have the right formatting, I created a certain custom Export Specification.

But now I'd like to insert a custom text in the first line of my text file, followed by a blank space and then the name of the table.
In my case it's


One line below there should be the normal text specified by Export Specification

But, into the LAST line, I would like to add custom text again, in my case:


Can you help me with some VBA Code or another solution to realize this?

Thank you so much in advance, Z

hi friends, pls help.
I am trying to replace the "Name" value with correspondingparalell value in the next coloum.

how to write this udpaet query?
pics attached.

basically all those "name"s should be removed, and instead paralell value from the next colum should but put in. how to write the update query pls?

Vivah Attached Thumbnails     Reply With Quote 02-10-2010, 08:54 PM #2 maximus Expert Windows 7 Access 2010 (version 14.0) Join Date Aug 2009 Location India Posts 925 I have checked your screen shots. You want to basically replace the first field data with the data in the parallel feild.

use this sql to create your update query:

UPDATE TableName SET TableName.FieldName you want to update = [TableName].[Parallel FieldName]; is the syntax
UPDATE sfw Inventory SET sfw.Softwarename = [sfw Inventory].[Version];(This is what you need to type check the field names before you proceed)

if you want to create the query using the query wizard

Create an update query
In the First Column Field Select the Field you want to update
In UpdateTo type the following [swf Inventory].[version]

run the query

please mark this thread to be solved if you are able to solve your problem.

Recently I created a report with text boxes that were visible only if not null. I also made the page header labels invisible if the detail text boxes were null. This worked fine when dealing with records of the current year.

When combining records from prior years, I noticed that the page header labels appeared only if the first text fields of the columns were not null. If the first field was null then no label, even if the second field in the column was not null.

My code is :
If IsNull (Me.SumOfFeb) Then
Me.LblSumOfFeb.visible= False
End If

I put it in ON FORMAT of the page header.

Is there a way to correct this problem?

I'm new in this forum and am apealling to you for help.
I'm using a Listbox based on a Table, and I've selected "yes" on the Column Heads format option. Whenever the field name is bigger than the Column Width I defined it's cutted.
Since Access doesn't allow (I think) to put carriage returns or line feeds in Table fileds names (I tryed like this: MyDB.TableDefs("XTmpHosp0").Fields(8).Name = "RSU" & Chr(10) & Chr(13) & "A28I04"), I then tryed to put a space between words hopping that it would show the field name in 2 separate lines ("RSU A28I04") but it didn't work.
Is there a way to wrap text like you do for a Cell in Excell?
I'm using Access 97.



I have a subform appearing on a report (should I be using a subform or subreport?? I've tried both and don't really see the difference)

Anyway, the subform is in datasheet view. Is there a way to wrap the text so that it all displays in the report?

I'm getting the impression that it can only be done if I set the view to continous form and format it to look like a datasheet.

Thanks in anticipation!


I use the following code to create a Word document from Access.

	 Set objword = New Word.Application

    With objword
      .Visible = True
      .Documents.Add Template:=("i:ia manualtemplatesquality assurance review.dot")
      .Selection.Goto Name:=("job")
      .Selection.TypeText Text:=(Forms![frm recs tracked jobs]![Job])
      .Selection.Goto Name:=("auditor")
      .Selection.TypeText Text:=(Forms![frm recs tracked jobs]![AuditorName])
      .ActiveDocument.SaveAs (QARname)
    End With

"job" and "auditor" are bookmarks saved in the body of the Word template. This works fine.

However, I have another Word document I want to create which has a table in the page header. I want to insert the [AuditorName] and [Job] as above into this table. I have created bookmarks in the table but as it is in the page header ".Selection.Goto Name" will not work, as it can't find the bookmark.

I tried various things e.g.

	.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
.Selection.TypeText Text:=(Forms![frm recs tracked jobs]![Job])
.Selection.Goto Name:=("Job")

but all I get is "Run-time error 5678. Word cannot find the requested bookmark."

I then recorded the procedure as a macro in Word:

	Sub Macro2()

    If ActiveWindow.View.SplitSpecial  wdPaneNone Then
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
        ActivePane.View.Type = wdOutlineView Then
        ActiveWindow.ActivePane.View.Type = wdPrintView
    End If
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.GoTo What:=wdGoToBookmark, Name:="Dept"
    With ActiveDocument.Bookmarks
        .DefaultSorting = wdSortByName
        .ShowHidden = True
    End With
    Selection.TypeText Text:="gg"
End Sub

I tried inserting the relevant parts of this in the Access module but got the same error. (Incidently, running the above macro in the word document also results in a bookmark not found error.)

Any advice would be greatly appreciated.



I have a problem and i need your advice. I am creating an access software that browses for a folder with *.doc(x) files and for each one of these adds custom text with formatting at the end (as a new line) of each selected section, meaning header or footer.
I have managed to create the whole functionallity however although i can insert at the end of the header text, no formatting is available and any change to formatting commands effects all header or footer content. I want to add a new line at the end of the header with a formatting diffirent than the previous lines.

I give a piece of my code.

PHP Code:
Sub InsertHeaderFooter(ByRef ws As Word.Document, ByRef wordObj As Word.Application)
On Error Resume Next
' inserts the same header/footer in all worksheets
Dim fSz As String
Dim Color As String
Dim bold As Boolean
Dim ital As Boolean
Dim under As Boolean
Dim paragraph As Word.paragraph
Color = ""
bold = False
ital = False
under = False
'Global choices.
If Me.FontSz.Value 

I apologize in advance for the length here. I always tend to be long winded in my explanations so I will try and keep as simple as possible.
I have two main tables that I am attempting to split up into several tables.
The two primary tables are: “VEHICLES” and “EQUIPMENT”
There are many fields in each table so I’m trying to create tables for some of these fields and set a primary key in those tables pointing back to a Foreign Key in one or both of the above referenced tables.
As I said, there will be many additional tables but If I can get help figuring this out on one, I can replicate on the others.
For reasons of explanations I’ll include one of the additional tables which will have Foreign Keys in both VEHICLES and EQUIPMENT tables. This table is “VHIC” for Vehicle ID Code.
It is a 6 character text field. An example of a record would be “VTR123”.

I created the VHIC table with two fields, one for text (6-characters) and one for VHIC_ID which is the primary key and autonumber.
I then created a number field in the VEHICLES table, named it: ‘VHIC_ID’ (Foreign Key in VEHICLES) number-long integer and then in Relationships created a relationship from the VHIC table to VEHICLES.
So far, so Good or so I thought.
Lets go back to the example Record I have above, which is : VTR123
for that specific row in the VHIC table I have a VHIC_ID number of 127 (meaning it is the 127th record in the table) and the record VTR123 in the column next to it.
Going back over to the VEHICLES table under the Foreign Key VHIC_ID it is displaying 127.
I want to be able to open the VEHICLES table and see (in the actual table, not a query or form view) VTR123 displayed in the VHIC_ID column.
I know it can be done as I have seen and torn apart a template for another access DB I downloaded off the templates section of Microsoft.
That database is Orders management database.
The first complication is that I am going from a number format as a primary key to a number format in Foreign Key field and trying to display text.
In the Orders Management DB I see the following for the EmployeesID colum in the Orders Table:

SELECT [EmployeeID], [LastName] & ", " &
[FirstName] FROM Employees ORDER BY
This SQL is in the RowSource in the LookUP tab on that field.
Again, this is a number datatype and it is pulling not only one column of text data from another table but both first and last name.
I now click open the ORDERS table and right there under EmployeeID is first name and last name.
If I click on a name it opens a drop down where I can select from other employees first and last name, all in a field that has data type set for number.

I have tried to replicate this SQL in the LOOKUP tab in the VEHICLES table for VHIC_ID but obviously changing the SQL to reflect the correct names.
When I open the VEHICLES table and go over to VHIC_ID column I still see the autonumbers pulling from the VHIC and this is what happens when I click on one of those numbers:
I get a drop down and the values I can choose from are the 6-characted text (example: VTR123)
If I choose one, it throws up an error that I am trying to select Text for a Number data type column.
Any idea how to fix this?
I want to see only related records from the VHIC table and not the autonumbers, only the related 6-character records.
any and all help will be VERY much appreciated.


Without the knowledge of a programmer, I would like to know how to increase the amount of text in a field column. I administer a Vehicle data base but can only put in the make like Skoda, and model Octavia, but no other details on the end like for example 1.9 TDI SE 5dr Estate as not enough room on the end.

First how can i increase the column width and second, how can i then increase the amount of text.



I am an archaeologist who has been given the task of transforming our artifact database from Paradox into Access format. We use codes in our cataloging process to represent artifact attributes. For example, a piece of pottery is described in this way:

C = Ceramic
WE = White earthenware
WW = Whiteware
R = Rim
HP = Hand Painted
GREE = Green

So, our data entry uses the codes which ideally transform into text in another column to facilitate a report without codes visible.
Although I have figured ot the list/combo boxes for the code columns, I can not figure out how to have the code appear in one column and the text appear in another in my data entry table.
I tried creating relationships between columns with the code and text but this did not work. Since Paradox did this automatically, I am at a loss. Does anyone have some advice? I would greatly appeciate it!
Thank You, Michelle


Could you help me with the following.

Lets say I have table with one of the field header as 'notes'.
The notes is of type 'text'

In the notes column information like the following is typed out

Record 1 - MAX O.D 3.456" Min ID 1.2 and OAL 3.4"


Record 2 - MAX O/D 5.456" Min I.D 1.2" and Min Length 4.4 inches

Please note that as shown in the example there is no standard way of entering data. The only order that is followed is that the first numerical value corresponds to OD, 2nd corresponds to ID and 3rd corresponds to overall length.

I want to pull out the first numerical value (3.456 - first example, 5.456 -second example) and the last numerical value (3.4 -first example and 4.4 in second example). How would I be able to do this.

So the end result should be 2 more columns with max od as one and min length as the other.

On my report, I have a textbox which is populated with data from a query.
Occasionally, the text is too long for the textbox and I need to wrap it onto the next line.
Is there anyway to do that?
I can't find a property for it at the moment...

Hi folks,

I've got a database that I'm putting together in Access 2003 that users can enter incoming and outgoing correspondences into. Along with this I've created several reports for when the boss needs to see what's happening (all incoming, all outgoing, etc). Two of the reports are based on a date range that the user enters in a form and I've become stuck on how I get the entered date range to appear in the header for the report.

I know it'll be something simple to enter into a text box but my mind refuses to be of any assistance so any help you guys can provide would be greatly appreciated.


I'm making a simple code to open a detail report using a clicked text box as a filter. First part works fine, activated on click from the [Fee Description] text box in the header:

	Private Sub Description_Click()

Dim Filter As String
Filter = Me.[Fee Description]
DoCmd.OpenReport "Tap and Hydrant Install Cost Detail", acViewPreview, , "[Fee Description] = '" & Filter & "'"

End Sub

I'm trying to expand this to include a subset as additional filter ([Fee Descriptoin] and [TAPSIZE]):

	Private Sub TapSize_Click()

Dim Filter1 As String
Dim Filter2 As String
Filter2 = Me.TAPSIZE
Filter1 = Me.[Fee Description]
DoCmd.OpenReport "Tap and Hydrant Install Cost Detail", acViewPreview, ,  "[Fee Description] = '" & Filter1 & "' And
[TAPSIZE] = '" &  Filter2 & "'"

End Sub

If I sub in a Fee Description directly into Filter1, the report opens just fine. It just keeps hanging up on me.[Fee Description] with run-time error 2465 - "Microsoft Office Access can't find the field 'Fee Description' referred to in your expression." Spelling is correct, copied identically from the working code above. What am I missing to be able to reference this field?


I have a combo box in the header area. The record source, Bound Column are set correctly ( I know because I tested it on a form ). In this instance, the user would select from the dropdown list, the name of a member of staff, based on the click-event, and passing the Staff_ID to a variable, this would be used to filter a recordset/recordsource for the report. However, there is no dropdown ( or arrow on combo - so no name can be selected ) ? Any ideas.

Not finding an answer? Try a Google search.