Steve Schapel
steve at datamanagementsolutions.biz
Fri Jul 25 23:02:21 CDT 2014
Hi Borge Yes, I understand, you have a very complex calculation. In such a case, my choice would almost always be to write the concatenation in VBA as a user-defined function, and then use that UDF in the calculated field expression in the query. Regards Steve -----Original Message----- From: Borge Hansen Sent: Saturday, July 26, 2014 6:02 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Question re calculated text control on Report Hi Steve, Yes that is my preferred way as well, but for concatenated text columns resulting in more than 255 characters I've found that it is better to do the concatenation on a calculated text control in the report. You may experience that the query will truncate on the 255 character.... /borge On Fri, Jul 25, 2014 at 5:10 PM, Steve Schapel < steve at datamanagementsolutions.biz> wrote: > Borge > > My standard practice here is to create the calculated field in the > report's Record Source query, rather than within the Control Source of the > textbox. > > Regards > Steve > > -----Original Message----- From: Borge Hansen > Sent: Friday, July 25, 2014 8:44 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Question re calculated text control on Report > > > MS Access 2003 > > The question concerns a calculated text control on a report that for > example primarily concatenates a number of "fields" including testing for > whether a "field" has any text, etc. etc. > > I am re-visiting a report to make changes and see that none of the > "fields" > referred to such a calculated text control exist as text controls > themselves on the report. > > The "fields" are columns from the report's record source query. > > I seem to recall that in the past I have run into problems when the query > fields used on a calculated text control were not present as (hidden or > zero sized) text controls on the report. > > A hidden text control would as an example have same name as the Control > Source > Name: LastName > Control Source: LastName > > So what is best practice here? > > a) ok to refer to query columns in the record source query on calculated > text controls > > or > > b) for query columns that we make reference to on a calculated text > control > - always have them present on the report as (hidden or zero sized) text > controls themselves > > ?? > > What is really going on behind the scenes? I have always been unsure about > text controls having as name same name as the Control Source (the control > source being either a table column name or query column name) > > > /borge > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com