Memo Field Truncation

Q

Question Boy

I am trying to execute the following Sql through VBA and the first 2 fields
are always cut off. They are both pulled from the same table field which is
a memo field. I tried switching from Group By To First, but no change, still
cut off.

SELECT
IIf(InStr([303-01_ACTIONS_LOG],"&&")=0,[303-01_ACTIONS_LOG],Trim(Left([303-01_ACTIONS_LOG],InStr([303-01_ACTIONS_LOG],"&&")-1)))
AS Description,
IIf(InStr([303-01_ACTIONS_LOG],"&&")=0,"N/A",Trim(Right([303-01_ACTIONS_LOG],Len([303-01_ACTIONS_LOG])-InStr([303-01_ACTIONS_LOG],"&&")-1)))
AS Reponse, [905-COMMUNICATION ACTIONS].[303-03_RESPONSABLE_LOG] AS
Responsable, [905-COMMUNICATION ACTIONS].[303-04_DATE DUE_LOG] AS [Date]
FROM [905-COMMUNICATION ACTIONS]
WHERE ((([905-COMMUNICATION ACTIONS].Minutes)=True) AND (([905-COMMUNICATION
ACTIONS].[900-01_Numéro de Projet])='07E047'))
ORDER BY [905-COMMUNICATION ACTIONS].[303-04_DATE DUE_LOG] DESC;

How can I return the complete values for the 1st 2 columns?

Qb
 
Q

Question Boy

Ok, I got back to basics and tried the following simplified version of the SQL

SELECT First([905-COMMUNICATION ACTIONS].[303-01_ACTIONS_LOG]) AS Description
FROM [905-COMMUNICATION ACTIONS]
WHERE ((([905-COMMUNICATION ACTIONS].Minutes)=True) AND (([905-COMMUNICATION
ACTIONS].[900-01_Numéro de Projet])="07E047"));

Then I added in an IIF statement as shown below

SELECT
First(IIf(InStr([303-01_ACTIONS_LOG],"&&")=0,[303-01_ACTIONS_LOG],Trim(Left([303-01_ACTIONS_LOG],InStr([303-01_ACTIONS_LOG],"&&")-1)))) AS Description
FROM [905-COMMUNICATION ACTIONS]
WHERE ((([905-COMMUNICATION ACTIONS].Minutes)=True) AND (([905-COMMUNICATION
ACTIONS].[900-01_Numéro de Projet])="1572"));

And it no longer works, the field is cutoff at 255 chrs.

The problem is that although I identified the issue, I have no clue on how
to solve it. I need the conditional statement and I also need the complete
text!?

Thank you in advance for your help,

QB
 

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