Re: Concatenating text fields with a WHERE condition



Salad <oil@xxxxxxxxxxx> wrote in
news:9WYSe.767$9x2.766@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:

> Bob Quintal wrote:
>> "Dixie" <dixie@xxxxxxxxxxx> wrote in
>> news:43166039$1@xxxxxxxxxxxxxxxxxxxxxx:
>>
>>
>>>I have a problem using Dev Ashish's excellent module to
>>>concatenate the results of a field from several records into
>>>one record.
>>>
>>>I am using the code to concatenate certain awards onto a
>>>certificate at the end of the year. I have the code working
>>>fine, except for the fact that when I want to restrict the
>>>entries to awards between certain dates, even though I can
>>>use the restriction in the query that shows the actual
>>>records, when the fConcatChild function runs, it picks up all
>>>the entries, regardless of the date restriction. I tried to
>>>run the table part as a qry rather than a tbl, but no joy. I
>>>think the code inside Dev's module will need to get have the
>>>date restriction in it. I need the type of restriction that
>>>is WHERE Date >start date <End date.
>>>
>>>Does anyone know how to do that within the module.
>>>The code in that module is beyond my expertise.
>>>
>>
>> Dev's code works perfectly well against a query name passed
>> as the strChildTable parameter, so your problem is for some
>> reason other than the code,
>>
>> I see from other replies that you encountered other issues
>> with the date format issues.
>>
>> Did you check that the query has all the fields from your
>> main table and just a filter for the date range. Test it to
>> make sure that that's not where the problem lies.
>>
>> example:.
>> SELECT * from tblSomeTable WHERE dMyDate BETWEEN dLoDate AND
>> dHiDate.
>
> Hi Bob. She had a second parameter, date range. Dev's code
> only took into consideration 1 criteria for the filter.

Sorry for the belated reply, I was using teranews, which started
dropping posts, and has been unreachable for a week now.

Anyways, I addressed the question of the date range, but perhaps
I could have done so more clearly.

Dixie claimed, and I quote
>>>the entries, regardless of the date restriction. I tried to
>>>run the table part as a qry rather than a tbl, but no joy. I

to which I answered

>> Dev's code works perfectly well against a query name passed
>> as the strChildTable parameter, so your problem is for some
>> reason other than the code,
>>
That query would have filtered against the date range, returning
the pk and values to be concatenated. ,

--
Bob Quintal

PA is y I've altered my email address.
.



Relevant Pages

  • Re: How to Filter Numbers
    ... thus you can query each field as necessary. ... can always be concatonated in a query if necessay to form the "big" number: ... Can I break Big Number into small numbers and then later concatenate? ... Because I would need to filter it on each individual small numbers. ...
    (comp.databases.ms-access)
  • Please Help: Cannot UPDATE a table based on a query
    ... the above would be an UPDATE query not *code* as you indicated ... "Gina Whipp" wrote: ... then filter the records to get even more specific records. ...
    (microsoft.public.access.formscoding)
  • Re: Update Query based on Current Recordset
    ... Gina Whipp ... 2010 Microsoft MVP (Access) ... can base your update query on this. ... I opened the Properties dialog of the form and looked at the Filter ...
    (microsoft.public.access.formscoding)
  • Re: Help with Microsoft help on linking Access to Outlook
    ... and have the query point to the combo box to get its value. ... the same filtered recordset every time. ... choose themselves what fields to filter on. ... Set MyRS = MyDB.OpenRecordset" ...
    (microsoft.public.access.formscoding)
  • Re: Update Query based on Current Recordset
    ... let's make the UPDATE query control that. ... I opened the Properties dialog of the form and looked at the Filter row. ... "Gina Whipp" wrote: ... UPDATE tblData SET tblData.ThreatStatus = Closed WHERE ...
    (microsoft.public.access.formscoding)