Welcome to SPN

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

Sign Up Now!

Sort, and then sort from the first sort

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

Tags:
  1. KB

    KB
    Expand Collapse
    Guest

    In my database with columns (among others) "Date" and "Status", I have
    information I need to pull up primarily by date. In the Date column, I
    entered "Enter a start/ end date" criteria, and it only pulls up that
    information just fine. My problem is now that those dates are up, I now only
    want to show those files that are labelled "pending" in the status column. I
    tried to enter pending in the criteria area, and access doesnt know which
    criteria to sort as primary, so it lists all "pending" jobs, regardless of
    date criteria. How do I sort first by date, then by status based on the dates
    entered?
    I did get a resoponse to post my sql, I was hoping for a more specific answer.

    Thanks!
     
  2. Loading...

    Similar Threads Forum Date
    I am sort of new to Sikhism New to Sikhism May 3, 2013
    Consortium agrees to pay 11.3 billion dollars for SunGard Data Systems (AFP) Interfaith Dialogues Mar 28, 2005

  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    I've posted an example at the following URL ...

    http://brenreyn.brinkster.net/filtersortexample.zip

    There are three queries in the example, 'qrySort' demonstrates how to sort
    on two columns, 'qryFilter' demonstrates how to filter by two columns, and
    'qrySortAndFilter' demonstrates how to sort on one column while filtering by
    another.

    --
    Brendan Reynolds
    Access MVP


    "KB" <KB@discussions.microsoft.com> wrote in message
    news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    > In my database with columns (among others) "Date" and "Status", I have
    > information I need to pull up primarily by date. In the Date column, I
    > entered "Enter a start/ end date" criteria, and it only pulls up that
    > information just fine. My problem is now that those dates are up, I now
    > only
    > want to show those files that are labelled "pending" in the status column.
    > I
    > tried to enter pending in the criteria area, and access doesnt know which
    > criteria to sort as primary, so it lists all "pending" jobs, regardless of
    > date criteria. How do I sort first by date, then by status based on the
    > dates
    > entered?
    > I did get a resoponse to post my sql, I was hoping for a more specific
    > answer.
    >
    > Thanks!
     
  4. Michael J. Strickland

    Michael J. Strickland
    Expand Collapse
    Guest

    "KB" <KB@discussions.microsoft.com> wrote in message
    news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    > In my database with columns (among others) "Date" and "Status", I have
    > information I need to pull up primarily by date. In the Date column, I
    > entered "Enter a start/ end date" criteria, and it only pulls up that
    > information just fine. My problem is now that those dates are up, I now
    > only
    > want to show those files that are labelled "pending" in the status column.
    > I
    > tried to enter pending in the criteria area, and access doesnt know which
    > criteria to sort as primary, so it lists all "pending" jobs, regardless of
    > date criteria. How do I sort first by date, then by status based on the
    > dates
    > entered?
    > I did get a resoponse to post my sql, I was hoping for a more specific
    > answer.
    >
    > Thanks!



    In Query Design View:

    1. For the "Sort" box of the Date field, select Ascending.
    2. For the "Criteria" box of the Date field, enter the dates you want to
    select separated by Or (e.g. 10/01/06" Or "11/01/06" Or ...).

    3. In the Criteria box of the Status field, enter "pending".

    --
    ---------------------------------------------------------------
    Michael J. Strickland
    Quality Services qualityser@att.net
    703-560-7380
    ---------------------------------------------------------------
     
  5. KB

    KB
    Expand Collapse
    Guest

    Thanks, the only thing is I still need to make it date sensative. In the
    criteria section, under date criteria, I already have "Between [Enter a
    Beginning Date:] And [Enter a Ending Date:]", so it will ask for dates before
    even opening the query. When I tried to also enter "<>"pending"" in the
    criteria under status, it pulls up the dates specified, but it gives every
    status except "pending".
    Any way to reverse it?

    I think I'm almost there.

    "Brendan Reynolds" wrote:

    > I've posted an example at the following URL ...
    >
    > http://brenreyn.brinkster.net/filtersortexample.zip
    >
    > There are three queries in the example, 'qrySort' demonstrates how to sort
    > on two columns, 'qryFilter' demonstrates how to filter by two columns, and
    > 'qrySortAndFilter' demonstrates how to sort on one column while filtering by
    > another.
    >
    > --
    > Brendan Reynolds
    > Access MVP
    >
    >
    > "KB" <KB@discussions.microsoft.com> wrote in message
    > news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    > > In my database with columns (among others) "Date" and "Status", I have
    > > information I need to pull up primarily by date. In the Date column, I
    > > entered "Enter a start/ end date" criteria, and it only pulls up that
    > > information just fine. My problem is now that those dates are up, I now
    > > only
    > > want to show those files that are labelled "pending" in the status column.
    > > I
    > > tried to enter pending in the criteria area, and access doesnt know which
    > > criteria to sort as primary, so it lists all "pending" jobs, regardless of
    > > date criteria. How do I sort first by date, then by status based on the
    > > dates
    > > entered?
    > > I did get a resoponse to post my sql, I was hoping for a more specific
    > > answer.
    > >
    > > Thanks!

    >
    >
    >
     
  6. BruceM

    BruceM
    Expand Collapse
    Guest

    I think that BETWEEN [Start Date] AND [End Date] would work best for the
    date criteria. OR would look for records on one of two dates, rather than
    within a range.

    "Michael J. Strickland" <qualityser@worldnet.att.net> wrote in message
    news:vyfig.9838$mF2.1201@bgtnsc04-news.ops.worldnet.att.net...
    > "KB" <KB@discussions.microsoft.com> wrote in message
    > news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    >> In my database with columns (among others) "Date" and "Status", I have
    >> information I need to pull up primarily by date. In the Date column, I
    >> entered "Enter a start/ end date" criteria, and it only pulls up that
    >> information just fine. My problem is now that those dates are up, I now
    >> only
    >> want to show those files that are labelled "pending" in the status
    >> column. I
    >> tried to enter pending in the criteria area, and access doesnt know which
    >> criteria to sort as primary, so it lists all "pending" jobs, regardless
    >> of
    >> date criteria. How do I sort first by date, then by status based on the
    >> dates
    >> entered?
    >> I did get a resoponse to post my sql, I was hoping for a more specific
    >> answer.
    >>
    >> Thanks!

    >
    >
    > In Query Design View:
    >
    > 1. For the "Sort" box of the Date field, select Ascending.
    > 2. For the "Criteria" box of the Date field, enter the dates you want to
    > select separated by Or (e.g. 10/01/06" Or "11/01/06" Or ...).
    >
    > 3. In the Criteria box of the Status field, enter "pending".
    >
    > --
    > ---------------------------------------------------------------
    > Michael J. Strickland
    > Quality Services qualityser@att.net
    > 703-560-7380
    > ---------------------------------------------------------------
    >
    >
     
  7. KB

    KB
    Expand Collapse
    Guest

    I do have that in the criteria under date, so when I click on the query, I am
    asked for a start date and a finish date before it will open the query, and
    when it opens, I do only get the info in between the dates specified. The
    problem is that when I add "pending" in the status column under criteria, it
    still asks me for in between dates as the date column criteria has asked it
    to do, but after I enter the dates, it opens the query, and shows all pending
    jobs, regardless of the in between dates I just entered.

    "BruceM" wrote:

    > I think that BETWEEN [Start Date] AND [End Date] would work best for the
    > date criteria. OR would look for records on one of two dates, rather than
    > within a range.
    >
    > "Michael J. Strickland" <qualityser@worldnet.att.net> wrote in message
    > news:vyfig.9838$mF2.1201@bgtnsc04-news.ops.worldnet.att.net...
    > > "KB" <KB@discussions.microsoft.com> wrote in message
    > > news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    > >> In my database with columns (among others) "Date" and "Status", I have
    > >> information I need to pull up primarily by date. In the Date column, I
    > >> entered "Enter a start/ end date" criteria, and it only pulls up that
    > >> information just fine. My problem is now that those dates are up, I now
    > >> only
    > >> want to show those files that are labelled "pending" in the status
    > >> column. I
    > >> tried to enter pending in the criteria area, and access doesnt know which
    > >> criteria to sort as primary, so it lists all "pending" jobs, regardless
    > >> of
    > >> date criteria. How do I sort first by date, then by status based on the
    > >> dates
    > >> entered?
    > >> I did get a resoponse to post my sql, I was hoping for a more specific
    > >> answer.
    > >>
    > >> Thanks!

    > >
    > >
    > > In Query Design View:
    > >
    > > 1. For the "Sort" box of the Date field, select Ascending.
    > > 2. For the "Criteria" box of the Date field, enter the dates you want to
    > > select separated by Or (e.g. 10/01/06" Or "11/01/06" Or ...).
    > >
    > > 3. In the Criteria box of the Status field, enter "pending".
    > >
    > > --
    > > ---------------------------------------------------------------
    > > Michael J. Strickland
    > > Quality Services qualityser@att.net
    > > 703-560-7380
    > > ---------------------------------------------------------------
    > >
    > >

    >
    >
    >
     
  8. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    Change '<>' to '='.

    --
    Brendan Reynolds
    Access MVP

    "KB" <KB@discussions.microsoft.com> wrote in message
    news:9F636A6E-E1F3-4F04-93F3-B736423B878E@microsoft.com...
    > Thanks, the only thing is I still need to make it date sensative. In the
    > criteria section, under date criteria, I already have "Between [Enter a
    > Beginning Date:] And [Enter a Ending Date:]", so it will ask for dates
    > before
    > even opening the query. When I tried to also enter "<>"pending"" in the
    > criteria under status, it pulls up the dates specified, but it gives every
    > status except "pending".
    > Any way to reverse it?
    >
    > I think I'm almost there.
    >
    > "Brendan Reynolds" wrote:
    >
    >> I've posted an example at the following URL ...
    >>
    >> http://brenreyn.brinkster.net/filtersortexample.zip
    >>
    >> There are three queries in the example, 'qrySort' demonstrates how to
    >> sort
    >> on two columns, 'qryFilter' demonstrates how to filter by two columns,
    >> and
    >> 'qrySortAndFilter' demonstrates how to sort on one column while filtering
    >> by
    >> another.
    >>
    >> --
    >> Brendan Reynolds
    >> Access MVP
    >>
    >>
    >> "KB" <KB@discussions.microsoft.com> wrote in message
    >> news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    >> > In my database with columns (among others) "Date" and "Status", I have
    >> > information I need to pull up primarily by date. In the Date column, I
    >> > entered "Enter a start/ end date" criteria, and it only pulls up that
    >> > information just fine. My problem is now that those dates are up, I now
    >> > only
    >> > want to show those files that are labelled "pending" in the status
    >> > column.
    >> > I
    >> > tried to enter pending in the criteria area, and access doesnt know
    >> > which
    >> > criteria to sort as primary, so it lists all "pending" jobs, regardless
    >> > of
    >> > date criteria. How do I sort first by date, then by status based on the
    >> > dates
    >> > entered?
    >> > I did get a resoponse to post my sql, I was hoping for a more specific
    >> > answer.
    >> >
    >> > Thanks!

    >>
    >>
    >>
     
  9. BruceM

    BruceM
    Expand Collapse
    Guest

    Try:
    ="Pending"
    Exactly as it appears, with the double quotes. It's not clear exactly what
    you used.

    "KB" <KB@discussions.microsoft.com> wrote in message
    news:9F636A6E-E1F3-4F04-93F3-B736423B878E@microsoft.com...
    > Thanks, the only thing is I still need to make it date sensative. In the
    > criteria section, under date criteria, I already have "Between [Enter a
    > Beginning Date:] And [Enter a Ending Date:]", so it will ask for dates
    > before
    > even opening the query. When I tried to also enter "<>"pending"" in the
    > criteria under status, it pulls up the dates specified, but it gives every
    > status except "pending".
    > Any way to reverse it?
    >
    > I think I'm almost there.
    >
    > "Brendan Reynolds" wrote:
    >
    >> I've posted an example at the following URL ...
    >>
    >> http://brenreyn.brinkster.net/filtersortexample.zip
    >>
    >> There are three queries in the example, 'qrySort' demonstrates how to
    >> sort
    >> on two columns, 'qryFilter' demonstrates how to filter by two columns,
    >> and
    >> 'qrySortAndFilter' demonstrates how to sort on one column while filtering
    >> by
    >> another.
    >>
    >> --
    >> Brendan Reynolds
    >> Access MVP
    >>
    >>
    >> "KB" <KB@discussions.microsoft.com> wrote in message
    >> news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    >> > In my database with columns (among others) "Date" and "Status", I have
    >> > information I need to pull up primarily by date. In the Date column, I
    >> > entered "Enter a start/ end date" criteria, and it only pulls up that
    >> > information just fine. My problem is now that those dates are up, I now
    >> > only
    >> > want to show those files that are labelled "pending" in the status
    >> > column.
    >> > I
    >> > tried to enter pending in the criteria area, and access doesnt know
    >> > which
    >> > criteria to sort as primary, so it lists all "pending" jobs, regardless
    >> > of
    >> > date criteria. How do I sort first by date, then by status based on the
    >> > dates
    >> > entered?
    >> > I did get a resoponse to post my sql, I was hoping for a more specific
    >> > answer.
    >> >
    >> > Thanks!

    >>
    >>
    >>
     
  10. BruceM

    BruceM
    Expand Collapse
    Guest

    My reply was to the person who suggested using OR in the criteria. For the
    other, I posted in another part of the thread, but here it is:
    ="Pending"
    exactly as it appears should produce the desired results.

    "KB" <KB@discussions.microsoft.com> wrote in message
    news:DEBF4DB7-B4F7-4E81-82A6-DF8918CEC57F@microsoft.com...
    >I do have that in the criteria under date, so when I click on the query, I
    >am
    > asked for a start date and a finish date before it will open the query,
    > and
    > when it opens, I do only get the info in between the dates specified. The
    > problem is that when I add "pending" in the status column under criteria,
    > it
    > still asks me for in between dates as the date column criteria has asked
    > it
    > to do, but after I enter the dates, it opens the query, and shows all
    > pending
    > jobs, regardless of the in between dates I just entered.
    >
    > "BruceM" wrote:
    >
    >> I think that BETWEEN [Start Date] AND [End Date] would work best for the
    >> date criteria. OR would look for records on one of two dates, rather
    >> than
    >> within a range.
    >>
    >> "Michael J. Strickland" <qualityser@worldnet.att.net> wrote in message
    >> news:vyfig.9838$mF2.1201@bgtnsc04-news.ops.worldnet.att.net...
    >> > "KB" <KB@discussions.microsoft.com> wrote in message
    >> > news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    >> >> In my database with columns (among others) "Date" and "Status", I have
    >> >> information I need to pull up primarily by date. In the Date column, I
    >> >> entered "Enter a start/ end date" criteria, and it only pulls up that
    >> >> information just fine. My problem is now that those dates are up, I
    >> >> now
    >> >> only
    >> >> want to show those files that are labelled "pending" in the status
    >> >> column. I
    >> >> tried to enter pending in the criteria area, and access doesnt know
    >> >> which
    >> >> criteria to sort as primary, so it lists all "pending" jobs,
    >> >> regardless
    >> >> of
    >> >> date criteria. How do I sort first by date, then by status based on
    >> >> the
    >> >> dates
    >> >> entered?
    >> >> I did get a resoponse to post my sql, I was hoping for a more specific
    >> >> answer.
    >> >>
    >> >> Thanks!
    >> >
    >> >
    >> > In Query Design View:
    >> >
    >> > 1. For the "Sort" box of the Date field, select Ascending.
    >> > 2. For the "Criteria" box of the Date field, enter the dates you want
    >> > to
    >> > select separated by Or (e.g. 10/01/06" Or "11/01/06" Or ...).
    >> >
    >> > 3. In the Criteria box of the Status field, enter "pending".
    >> >
    >> > --
    >> > ---------------------------------------------------------------
    >> > Michael J. Strickland
    >> > Quality Services qualityser@att.net
    >> > 703-560-7380
    >> > ---------------------------------------------------------------
    >> >
    >> >

    >>
    >>
    >>
     
  11. KB

    KB
    Expand Collapse
    Guest

    It worked. You have no idea how much I appreciate the help!

    "Brendan Reynolds" wrote:

    > Change '<>' to '='.
    >
    > --
    > Brendan Reynolds
    > Access MVP
    >
    > "KB" <KB@discussions.microsoft.com> wrote in message
    > news:9F636A6E-E1F3-4F04-93F3-B736423B878E@microsoft.com...
    > > Thanks, the only thing is I still need to make it date sensative. In the
    > > criteria section, under date criteria, I already have "Between [Enter a
    > > Beginning Date:] And [Enter a Ending Date:]", so it will ask for dates
    > > before
    > > even opening the query. When I tried to also enter "<>"pending"" in the
    > > criteria under status, it pulls up the dates specified, but it gives every
    > > status except "pending".
    > > Any way to reverse it?
    > >
    > > I think I'm almost there.
    > >
    > > "Brendan Reynolds" wrote:
    > >
    > >> I've posted an example at the following URL ...
    > >>
    > >> http://brenreyn.brinkster.net/filtersortexample.zip
    > >>
    > >> There are three queries in the example, 'qrySort' demonstrates how to
    > >> sort
    > >> on two columns, 'qryFilter' demonstrates how to filter by two columns,
    > >> and
    > >> 'qrySortAndFilter' demonstrates how to sort on one column while filtering
    > >> by
    > >> another.
    > >>
    > >> --
    > >> Brendan Reynolds
    > >> Access MVP
    > >>
    > >>
    > >> "KB" <KB@discussions.microsoft.com> wrote in message
    > >> news:37E97FF0-C70F-4FD1-BE98-511D29189E3E@microsoft.com...
    > >> > In my database with columns (among others) "Date" and "Status", I have
    > >> > information I need to pull up primarily by date. In the Date column, I
    > >> > entered "Enter a start/ end date" criteria, and it only pulls up that
    > >> > information just fine. My problem is now that those dates are up, I now
    > >> > only
    > >> > want to show those files that are labelled "pending" in the status
    > >> > column.
    > >> > I
    > >> > tried to enter pending in the criteria area, and access doesnt know
    > >> > which
    > >> > criteria to sort as primary, so it lists all "pending" jobs, regardless
    > >> > of
    > >> > date criteria. How do I sort first by date, then by status based on the
    > >> > dates
    > >> > entered?
    > >> > I did get a resoponse to post my sql, I was hoping for a more specific
    > >> > answer.
    > >> >
    > >> > Thanks!
    > >>
    > >>
    > >>

    >
    >
    >
     

Share This Page