Share via

My query returns a value of a question mark in this box  - Why?

Anonymous
2013-06-27T17:58:41+00:00

How do I correct this? It is suppose to return the value that is in a memo field.

In the past I would have to delete the data that I have entered into a linked table and now that process no longer works.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2013-06-27T21:08:37+00:00

    Why are you using a GROUP BY (Totals) query when you are not using an aggregate function (Count, Sum, etc)?  The only valid reason I can think of is to eliminate any duplicate records in the resulting dataset, which is more cleanly specified by using the DISTINCT predicate (Unique records).  Either way,

    the query will truncate any memo fields with more than 255 characters.

     

    I think you should first turn off the Totals option and make sure the Having clause becomes a WHERE clause.  Then see how it runs and report back with a Copy/Paste of the new version of the query and what happened.

    Thanks for the comment to my question -  as suggested by turning off the totals and adjust it to WHERE - did the trick.  Below is the revised query.  Thanks again.

    SELECT tblCTO.ProgramID, tblCTO.[CTO#], tblCTO.CTOName, tblCTO.Description, qryContacts.Name, qryContacts_1.Name, qryContacts_2.Name, tblMod.[Mod#], tblCTO.LongDesc, tblMod.Description, tblMod.StartDate, tblMod.EndDate, tblMod.Fee, tblMod.Cost, tblMod.TotalFunded, tblProgram.ProgramName, tblProgram.Client, tblProgram.[Contract#], tblProgram.ContractName, tblMod.Comment, tblCTO.CTOID, tblCTO.[Active?], tblCTO.CloseoutDate, qryProgramContact.Name, tblCTO.Location

    FROM (tblProgram INNER JOIN qryProgramContact ON tblProgram.ProgramID = qryProgramContact.ProgramID) INNER JOIN ((((qryContacts INNER JOIN tblCTO ON qryContacts.ContactID = tblCTO.PM) LEFT JOIN qryContacts AS qryContacts_1 ON tblCTO.CS = qryContacts_1.ContactID) LEFT JOIN qryContacts AS qryContacts_2 ON tblCTO.RPM = qryContacts_2.ContactID) INNER JOIN tblMod ON tblCTO.CTOID = tblMod.CTOID) ON tblProgram.ProgramID = tblCTO.ProgramID

    WHERE (((tblCTO.ProgramID)=[Enter the Program ID]))

    ORDER BY tblCTO.ProgramID, tblCTO.[CTO#], tblMod.[Mod#];

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-06-27T20:36:34+00:00

    Why are you using a GROUP BY (Totals) query when you are not using an aggregate function (Count, Sum, etc)?  The only valid reason I can think of is to eliminate any duplicate records in the resulting dataset, which is more cleanly specified by using the DISTINCT predicate (Unique records).  Either way,

    the query will truncate any memo fields with more than 255 characters.

    I think you should first turn off the Totals option and make sure the Having clause becomes a WHERE clause.  Then see how it runs and report back with a Copy/Paste of the new version of the query and what happened.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-06-27T20:06:44+00:00

    In a fast look over the query I do not see anything wrong so I think you may have some non-standard character in the memo field.

    Try copying and pasting in a test table text field and check the ASCII code by Asc([TextField]) to give you the numerial code.

    If unable that way then use MID function to extract it.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-06-27T19:30:32+00:00

    Post your query SQL.  How many characters are in the memo?

    There is no limitation on the memo field but is its not required, but as an estimate it could be upwards of 100.

    The odd part is when I run a similar query without using the Select tblCTO.ProgramID as a parameter the data in the memo field shows up. 

    SELECT tblCTO.ProgramID, tblCTO.[CTO#], tblCTO.CTOName, tblCTO.Description, qryContacts.Name, qryContacts_1.Name, qryContacts_2.Name, tblMod.[Mod#], tblCTO.LongDesc, tblMod.Description, tblMod.StartDate, tblMod.EndDate, tblMod.Fee, tblMod.Cost, tblMod.TotalFunded, tblProgram.ProgramName, tblProgram.Client, tblProgram.[Contract#], tblProgram.ContractName, tblMod.Comment, tblCTO.CTOID, tblCTO.[Active?], tblCTO.CloseoutDate, qryProgramContact.Name, tblCTO.Location

    FROM (tblProgram INNER JOIN qryProgramContact ON tblProgram.ProgramID = qryProgramContact.ProgramID) INNER JOIN ((((qryContacts INNER JOIN tblCTO ON qryContacts.ContactID = tblCTO.PM) LEFT JOIN qryContacts AS qryContacts_1 ON tblCTO.CS = qryContacts_1.ContactID) LEFT JOIN qryContacts AS qryContacts_2 ON tblCTO.RPM = qryContacts_2.ContactID) INNER JOIN tblMod ON tblCTO.CTOID = tblMod.CTOID) ON tblProgram.ProgramID = tblCTO.ProgramID

    GROUP BY tblCTO.ProgramID, tblCTO.[CTO#], tblCTO.CTOName, tblCTO.Description, qryContacts.Name, qryContacts_1.Name, qryContacts_2.Name, tblMod.[Mod#], tblCTO.LongDesc, tblMod.Description, tblMod.StartDate, tblMod.EndDate, tblMod.Fee, tblMod.Cost, tblMod.TotalFunded, tblProgram.ProgramName, tblProgram.Client, tblProgram.[Contract#], tblProgram.ContractName, tblMod.Comment, tblCTO.CTOID, tblCTO.[Active?], tblCTO.CloseoutDate, qryProgramContact.Name, tblCTO.Location

    HAVING (((tblCTO.ProgramID)=[Enter the Program ID]))

    ORDER BY tblCTO.ProgramID, tblCTO.[CTO#], tblMod.[Mod#];

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-06-27T18:26:12+00:00

    Post your query SQL.  How many characters are in the memo?

    Was this answer helpful?

    0 comments No comments