Re: list box from query

From: andrew (anonymous_at_discussions.microsoft.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 12:56:17 -0700

Thanks again!
If this helps, I have three nested forms (say, the parent,
child, and grandchild) The listbox is in the grandchild
form, and is based on a value in the child form.

If I open the form from the parent level, it will ask for
me to enter the query value.

If I open the form from the child level, it will update
the grandchild form without a prompt. But it also will
not update the query as I switch to a different record
value on the child field.

The help is appreciated! Thanks for the time.
Andrew

>-----Original Message-----
>If your reference in the query is correct it shouldn't be
prompting you for
>a value. Make sure that what you put in the query matches
the name of the
>control that has the test value. Select the control and
double check the
>name property (under the 'Other' tab).
>
>--
>Sandra Daigle [Microsoft Access MVP]
>Please post all replies to the newsgroup.
>
>
>andrew wrote:
>> Thanks so much for the help! One thing...when I open
the
>> form, it demands that I manually enter a value. How do
I
>> get it to look at the value on the parent form?
>>
>> Thanks again!
>> Andrew
>>
>>> -----Original Message-----
>>> Just reference the form control directly in the
query.. In the query
>>> designer put the following in the criteria field of
the appropriate
>>> column:
>>>
>>> forms!MyForm!MyControl
>>>
>>> Replace 'MyForm' with the name of the form that has
the filtering
>>> value and replace 'MyControl' with the control name.
>>>
>>> You may need to requery the listbox using the
AfterUpdate event of
>>> the Control that filters the listbox.
>>>
>>> --
>>> Sandra Daigle [Microsoft Access MVP]
>>> Please post all replies to the newsgroup.
>>>
>>>
>>> andrew wrote:
>>>> Hello all!
>>>> I have a list box (in a subform) that I want to
populate
>>>> from a query. I need to "send" to the query a value
from
>>>> the parent form.
>>>>
>>>> I created the query in design view, where it works
when I
>>>> manually "hard code" the determing value. How do I
get my
>>>> form to send different values to the query?
>>>>
>>>> Thanks!
>>>> Andrew
>>>
>>>
>>> .
>
>
>.
>



Relevant Pages

  • Re: Query vs form with child & parent: Deleting rows
    ... subordinate to that record, that is, all individuals (and sometimes child ... companies) whose Owner field contains the record key of the parent company. ... That second form is fed by this query: ... But I have a child table called "Channel"; ...
    (microsoft.public.access.forms)
  • Re: Queries involving subforms
    ... If you create your query, with the parent & child tables joined, and add the ... you will get as many as there are child rows ...
    (microsoft.public.access.queries)
  • listbox from query #2
    ... grandchild) I have a list box in the grandchild form, ... it should be populated based on a value in the child form. ... The query is functional. ... values in the parent form are changed? ...
    (microsoft.public.access.formscoding)
  • RE: Generating Schemas from one parent table and 2 child table
    ... your query here or elaborate more on what you are trying to accomplish? ... Thiago Almeida ... table with 2 child table. ... at-identity to copy the parent id to the child/children. ...
    (microsoft.public.biztalk.general)
  • Query vs form with child & parent: Deleting rows
    ... When I delete a row from a query involving both parent and child rows, ... when I display this query in a form and delete a row from there, ...
    (microsoft.public.access.forms)