Memo cut to 255 char in Grouped Query

G

Guest

I have a Memo field (greater than 255 characters). If I do a query with grouping, it trims it to 255 characters. If there is no grouping, it gives me the entire memo field. Anybody know why and how to work around this?
 
V

Van T. Dinh

When you use Group By, JET has to compare the values of the Memo Field and
it can compare Memo Field so the values are converted to String, i.e. 255
character limit.

Don't include your Memo Field in the Query and retrieve the Memo Field value
separately from the Query using DLookUp or other methods.

--
HTH
Van T. Dinh
MVP (Access)



Dan said:
I have a Memo field (greater than 255 characters). If I do a query with
grouping, it trims it to 255 characters. If there is no grouping, it gives
me the entire memo field. Anybody know why and how to work around this?
 
G

Guest

Thanks, I just used 2 queries and it worked - one with the groupings and the PK of the table with the memo, then joined that query to the table with the memo in a second query.

FYI (for anyone else who's curious) -
Query 1:

SELECT (tblCompany.CoName & " - " & tblDivision.DivName) AS CoDivName, (tblDivision.DivCity & ", " & tblState.StateAbbrev & " " & tblDivision.DivZip) AS DivAddress, (tblContact.CFirstName & " " & tblContact.CLastName) AS CName, tblNotes.NoteDate, tblNotes.NoteID
FROM tblState INNER JOIN ((tblCompany INNER JOIN tblDivision ON tblCompany.CoID=tblDivision.CoID) INNER JOIN (tblDept INNER JOIN (tblContact INNER JOIN tblNotes ON tblContact.ContactID=tblNotes.ContactID) ON tblDept.DeptID=tblContact.DeptID) ON tblDivision.DivID=tblDept.DivID) ON tblState.StateID=tblDivision.DivStateID
GROUP BY (tblCompany.CoName & " - " & tblDivision.DivName), (tblDivision.DivCity & ", " & tblState.StateAbbrev & " " & tblDivision.DivZip), (tblContact.CFirstName & " " & tblContact.CLastName), tblNotes.NoteDate, tblNotes.NoteID;

Query 2:

SELECT qryNotesGroup.CoDivName, qryNotesGroup.DivAddress, qryNotesGroup.CName, qryNotesGroup.NoteDate, tblNotes.Note
FROM qryNotesGroup INNER JOIN tblNotes ON qryNotesGroup.NoteID = tblNotes.NoteID;
 
V

Van T. Dinh

That's one of the "other methods" I wrote.

Appreciate you posted the solution / result so that others can look at it
when they have similar questions

--
HTH
Van T. Dinh
MVP (Access)



news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top