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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlookup in a report

Status
Not open for further replies.

SamuelR

MIS
May 11, 2023
7
JM
I have a report in ms access where I use a query as it's source the problem i'm having is with the memo field being truncated at 255 character.
please note i utilse an expression on the memo field in the query

Rem: Max(IIf(IsNull([Pst_Remarks])=True,[Allow_code],IIf(IsNull([Allow_code])=True,[Pst_Remarks],[Allow_code] & " " & [Pst_Remarks])))

how can i make the report show all character
 
Are all of these fields in your report's record source? You could create a user-defined function to replace the nested IIF()s.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
No the fields are in the query not in report. If I want to make changes to query access give me the run out memory error. So editing query is complex. So was wondering how to fix the limit given cause its a memo field but report see the expression as a text field
 
Okay that's weird when it opens
I know it will ask for different prompts also the query is the same name as report will upload a different copy tomorrow if problem still occur
 
That is one complex query. I typically build the where clause dynamically with only the criteria the user requests. Also, the query is a totals query which will truncate long text to 255 characters. Did you check the query values for the two fields?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
So is it best to have a where query as the main and a sub query that will reference from the criteria chosen by the user trying to figure what's best so it won't truncate the pstremark
 
I'm not even sure how to answer that without knowing a lot more about application and specifications. From the table structures and lack of relationships etc, I'm not sure I would want to open myself up to that.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Oh I did over the query without the where clause and just utilize the first function and it gave me everything thus far, time now to put in back all those where clause
 
The where clause is a complex affair. As I stated earlier, I like to build a where clause based on whether or not a control on a form is relevant or not. I think someone has a powerful where clause/filter builder in one of the FAQs in Tek-Tips.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Duly Noted, I made the change in the report and it work problem lies now due to the fact I've inserted a field that's not part of the query grouping is off.
So control source groups the data but now the report shows the remarks separate once I group multiple records.
 
Grouping in the query will limit the number of
Characters in any field to 256. You could possibly use a subreport if there is some unique field combination to link master/child.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top