Welcome to SPN

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

Sign Up Now!

Order by date on subform

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

  1. LouD

    LouD
    Expand Collapse
    Guest

    Okay,
    I have been searching this forum for two days for a way to sort by a field
    on my subform, and so far none of the answers are working for me.

    I have two tables one is named tblTimeSheet, and the other is
    tblSubTimeSheet. tblTimeSheet has three fields in it: Client,
    ServiceOrder(PK), and StatusOC.
    tblSubTimeSheet has six fields in it: PrimKey(just an autonumber),
    ServiceOrder, ServiceDate, Stime, Etime and WorkDone.
    I based the mainform on tblTimeSheet and the subform on a query of
    tblSubTimeSheet (the query for the subform has ServiceDate in the left most
    column and it is set to sort ascending).
    I linked the Master and Child fields to ServiceOrder.

    When I open the form it is still sorted by the ServiceOrder number.
    Maybe I'm just not reading your previous answers correctly. Any help would
    be appreciated.
     
  2. Loading...


  3. Mike Labosh

    Mike Labosh
    Expand Collapse
    Guest

    > I have been searching this forum for two days for a way to sort by a field
    > on my subform, and so far none of the answers are working for me.


    You should be able to something like this:

    MainForm: SELECT Blah, Thus, So, etc.
    SubForm: SELECT SomethingElse, Thus, So

    Then you have to specify something on your subform that ALSO exists on your
    main form so that the two forms know how to talk to each other. Remember
    when you first learned the wizard for this, it asked you what column was the
    same between the two forms.

    Go back to the design table, and define what columns you wish to see on the
    main form.
    Thhen go back and define what columns you wish to see on the sub form.

    Remember that the main form and the sub form must have something in common.

    The thing that they must have in common must be the column inside the parent
    table = the key inside the child table.

    Those are the "Fields" you choose for the data bindings.

    So, whatever defines uniqueness must be contained within the parent table.

    If this is trouble for you, please go reasearch "3NF" ( where 3 is better
    replaced with 4 or 5) out there in the world.
    --


    Peace & happy computing,

    Mike Labosh, MCSD MCT
    Owner, vbSensei.Com

    "Escriba coda ergo sum." -- vbSensei


    "LouD" <LouD@discussions.microsoft.com> wrote in message
    news:7C958DEE-0455-451E-BAA2-FF348ABB5BCD@microsoft.com...
    > Okay,
    >
    > I have two tables one is named tblTimeSheet, and the other is
    > tblSubTimeSheet. tblTimeSheet has three fields in it: Client,
    > ServiceOrder(PK), and StatusOC.
    > tblSubTimeSheet has six fields in it: PrimKey(just an autonumber),
    > ServiceOrder, ServiceDate, Stime, Etime and WorkDone.
    > I based the mainform on tblTimeSheet and the subform on a query of
    > tblSubTimeSheet (the query for the subform has ServiceDate in the left
    > most
    > column and it is set to sort ascending).
    > I linked the Master and Child fields to ServiceOrder.
    >
    > When I open the form it is still sorted by the ServiceOrder number.
    > Maybe I'm just not reading your previous answers correctly. Any help would
    > be appreciated.
    >
    >
     

Share This Page