Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Datasheet

Discussion in 'Information Technology' started by mcgj, Jul 28, 2006.

Tags:
  1. mcgj

    mcgj
    Expand Collapse
    Guest

    How do I in a subform shown as a datasheet increment through the records and
    set values for certain controls?

    Any help would be greatly appreciated!
     
  2. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Tue, 13 Jun 2006 15:41:02 -0700, mcgj
    <mcgj@discussions.microsoft.com> wrote:

    >How do I in a subform shown as a datasheet increment through the records and
    >set values for certain controls?
    >
    >Any help would be greatly appreciated!


    Ummm... by using the scrollbar and typing in the controls?

    I'm not at all sure I understand the question!

    John W. Vinson[MVP]
     
  3. mcgj

    mcgj
    Expand Collapse
    Guest

    Sorry, let me try to clarify. I have a subform that is in datasheet view it
    represents a query from a table that is related to the table of the main form
    in a one to many fashion. (Main form 1 Subform Many) I want a value that
    the user chooses on the main form to be transferred to all the records in the
    data sheet. I can get the value to the first record on the subform but how
    would I get it to subsequent records?

    Sorry for being vague in my first post...


    "John Vinson" wrote:

    > On Tue, 13 Jun 2006 15:41:02 -0700, mcgj
    > <mcgj@discussions.microsoft.com> wrote:
    >
    > >How do I in a subform shown as a datasheet increment through the records and
    > >set values for certain controls?
    > >
    > >Any help would be greatly appreciated!

    >
    > Ummm... by using the scrollbar and typing in the controls?
    >
    > I'm not at all sure I understand the question!
    >
    > John W. Vinson[MVP]
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Wed, 14 Jun 2006 04:46:02 -0700, mcgj
    <mcgj@discussions.microsoft.com> wrote:

    >Sorry, let me try to clarify. I have a subform that is in datasheet view it
    >represents a query from a table that is related to the table of the main form
    >in a one to many fashion. (Main form 1 Subform Many) I want a value that
    >the user chooses on the main form to be transferred to all the records in the
    >data sheet. I can get the value to the first record on the subform but how
    >would I get it to subsequent records?
    >
    >Sorry for being vague in my first post...


    The need to do this suggests (pretty strongly to me!) that your tables
    are not properly normalized. Normally one would NOT store the same
    information redundantly in both the parent and the child table. Are
    you certain that you need to do so? If so, why?

    If you do, then bear in mind that the Form (and subform) do NOT
    contain any data. They're just tools, windows onto the data. If you do
    in fact need to update multiple records in a child table, then it's
    much easier to do so using an Update Query to update the underlying
    table (and then requery the form). You could run this query from a
    command button on the mainform.

    John W. Vinson[MVP]
     
  5. mcgj

    mcgj
    Expand Collapse
    Guest

    John thanks for you suggestion I never thought of an update query that would
    work fine.

    In my child table I will not store redundant data. What I am doing is
    getting a starting point in for the user on the sub form from an value on the
    main form using an unbound combo box. I do this because I am using a combo
    box that has many entries in it on the sub form and I want the user to be
    able to sort to a particular set of values in all the combo boxes on the sub
    form (child) using a shorter list of values from the main form (parent).

    I appreciate your help in solving my problem and your advice on table design
    is well noted.

    "John Vinson" wrote:

    > On Wed, 14 Jun 2006 04:46:02 -0700, mcgj
    > <mcgj@discussions.microsoft.com> wrote:
    >
    > >Sorry, let me try to clarify. I have a subform that is in datasheet view it
    > >represents a query from a table that is related to the table of the main form
    > >in a one to many fashion. (Main form 1 Subform Many) I want a value that
    > >the user chooses on the main form to be transferred to all the records in the
    > >data sheet. I can get the value to the first record on the subform but how
    > >would I get it to subsequent records?
    > >
    > >Sorry for being vague in my first post...

    >
    > The need to do this suggests (pretty strongly to me!) that your tables
    > are not properly normalized. Normally one would NOT store the same
    > information redundantly in both the parent and the child table. Are
    > you certain that you need to do so? If so, why?
    >
    > If you do, then bear in mind that the Form (and subform) do NOT
    > contain any data. They're just tools, windows onto the data. If you do
    > in fact need to update multiple records in a child table, then it's
    > much easier to do so using an Update Query to update the underlying
    > table (and then requery the form). You could run this query from a
    > command button on the mainform.
    >
    > John W. Vinson[MVP]
    >
     
  6. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 15 Jun 2006 07:08:02 -0700, mcgj
    <mcgj@discussions.microsoft.com> wrote:

    >In my child table I will not store redundant data. What I am doing is
    >getting a starting point in for the user on the sub form from an value on the
    >main form using an unbound combo box. I do this because I am using a combo
    >box that has many entries in it on the sub form and I want the user to be
    >able to sort to a particular set of values in all the combo boxes on the sub
    >form (child) using a shorter list of values from the main form (parent).


    It sounds like - rather than updating records in the Subform's
    Recordsource table - that you should consider using a "conditional
    combo box". If you want the combo on the subform to display only a
    subset of records, based on the value of a combo on the mainform, you
    can base the subform combo on a Query referencing the mainform combo
    as a criterion.

    John W. Vinson[MVP]
     
  7. mcgj

    mcgj
    Expand Collapse
    Guest

    You are right that is a good idea too. I will set it up that way!

    "John Vinson" wrote:

    > On Thu, 15 Jun 2006 07:08:02 -0700, mcgj
    > <mcgj@discussions.microsoft.com> wrote:
    >
    > >In my child table I will not store redundant data. What I am doing is
    > >getting a starting point in for the user on the sub form from an value on the
    > >main form using an unbound combo box. I do this because I am using a combo
    > >box that has many entries in it on the sub form and I want the user to be
    > >able to sort to a particular set of values in all the combo boxes on the sub
    > >form (child) using a shorter list of values from the main form (parent).

    >
    > It sounds like - rather than updating records in the Subform's
    > Recordsource table - that you should consider using a "conditional
    > combo box". If you want the combo on the subform to display only a
    > subset of records, based on the value of a combo on the mainform, you
    > can base the subform combo on a Query referencing the mainform combo
    > as a criterion.
    >
    > John W. Vinson[MVP]
    >
     

Share This Page