Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field to small when data formatted as MM/YYYY?

Status
Not open for further replies.

TheVMan

IS-IT--Management
Feb 19, 2001
110
US
I keep getting this error:
The field into which you tried to insert or paste data is not large enough to hold the data. Try inserting or pasting less data.

In my query, I derive the date in the format MM/YYYY. The Query looks like this:
DatePart("m",[Date]) & "/" & DatePart("yyyy",[Date]) AS [Month]

This works great if I just dump it in a report. The thing is, I want to group on this field in the footer. When I enable it for sorting and grouping, it takes 5/2001 and makes it 5/2. Then, when I enable the footer, it gives the error that I mentioned above.

Any insight that can be provided would be greatly appreciated.

V
 

Datepart return an integer value. That may be causing the error. Change your query to create a string value.

format([date], "mm/yyyyy") Terry
------------------------------------
People who don't take risks generally make about two big mistakes a year. People who do take risks generally make about two big mistakes a year. -Peter Drucker
 
I tried this, and the result I got for 5/30/2001 for example looks like this:
05/2001150

Any further suggestions?

V
 

Sorry, there is an extra "y" in my post. It should read format([date], "mm/yyyy") Terry
------------------------------------
People who don't take risks generally make about two big mistakes a year. People who do take risks generally make about two big mistakes a year. -Peter Drucker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top