Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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.
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page