Welcome to SPN

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

Sign Up Now!

HELP - record keeping duplicating in other queries

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

  1. Sandi

    Sandi
    Expand Collapse
    Guest

    I have a database that I use to keep track of people in my office that I
    provide help to. Each month I create a new query for the month we are in to
    add new entries for the month. I created my July query like I have in the
    previous months and added my first entry. It keeps adding my July entry to
    the June query. I looked at my query in design view and it's based off my
    table and in the date field it's critera is set up as >6/30/2006 so it will
    not hold any entries from previous months. This is how I have been doing
    this for a year and have never had this type of problem. Any help would be
    appreciated
    --
    Sandi Gardner
     
  2. Loading...


  3. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    Hi Sandi

    Set your criteria as

    >#06/30/2006#


    Hope this helps
    --
    Wayne
    Manchester, England.



    "Sandi" wrote:

    > I have a database that I use to keep track of people in my office that I
    > provide help to. Each month I create a new query for the month we are in to
    > add new entries for the month. I created my July query like I have in the
    > previous months and added my first entry. It keeps adding my July entry to
    > the June query. I looked at my query in design view and it's based off my
    > table and in the date field it's critera is set up as >6/30/2006 so it will
    > not hold any entries from previous months. This is how I have been doing
    > this for a year and have never had this type of problem. Any help would be
    > appreciated
    > --
    > Sandi Gardner
     
  4. Sandi

    Sandi
    Expand Collapse
    Guest

    RE: HELP - record keeps duplicating in other other queries

    I've tried that and it doesn't work, it will not keep the entry since it is
    looking for June 30. The reason I set it as >6/30/06 is because nothing will
    show up which is what I want so I can entry my July information. It still
    saves my entry in the June query and form. I don't understand why this is
    happening now and it never has before.
    --
    Sandi Gardner


    "Wayne-I-M" wrote:

    > Hi Sandi
    >
    > Set your criteria as
    >
    > >#06/30/2006#

    >
    > Hope this helps
    > --
    > Wayne
    > Manchester, England.
    >
    >
    >
    > "Sandi" wrote:
    >
    > > I have a database that I use to keep track of people in my office that I
    > > provide help to. Each month I create a new query for the month we are in to
    > > add new entries for the month. I created my July query like I have in the
    > > previous months and added my first entry. It keeps adding my July entry to
    > > the June query. I looked at my query in design view and it's based off my
    > > table and in the date field it's critera is set up as >6/30/2006 so it will
    > > not hold any entries from previous months. This is how I have been doing
    > > this for a year and have never had this type of problem. Any help would be
    > > appreciated
    > > --
    > > Sandi Gardner
     
  5. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    RE: HELP - record keeps duplicating in other other queries

    No worries - there is always something your can try (well most the times)

    Try this

    June
    USA >#06/01/2006# and <#30/06/2006#
    UK >#01/06/2006# and <#30/06/2006#


    July
    USA >#07/01/2006# and <#31/07/2006#
    UK >#01/07/2006# and <#31/07/2006#


    August
    USA >#08/01/2006# and <#08/31/2006#
    UK >#01/08/2006# and <#31/08/2006#

    Etc, etc

    If this doesn't work can you post the sql of the query

    --
    Wayne
    Manchester, England.



    "Sandi" wrote:

    > I've tried that and it doesn't work, it will not keep the entry since it is
    > looking for June 30. The reason I set it as >6/30/06 is because nothing will
    > show up which is what I want so I can entry my July information. It still
    > saves my entry in the June query and form. I don't understand why this is
    > happening now and it never has before.
    > --
    > Sandi Gardner
    >
    >
    > "Wayne-I-M" wrote:
    >
    > > Hi Sandi
    > >
    > > Set your criteria as
    > >
    > > >#06/30/2006#

    > >
    > > Hope this helps
    > > --
    > > Wayne
    > > Manchester, England.
    > >
    > >
    > >
    > > "Sandi" wrote:
    > >
    > > > I have a database that I use to keep track of people in my office that I
    > > > provide help to. Each month I create a new query for the month we are in to
    > > > add new entries for the month. I created my July query like I have in the
    > > > previous months and added my first entry. It keeps adding my July entry to
    > > > the June query. I looked at my query in design view and it's based off my
    > > > table and in the date field it's critera is set up as >6/30/2006 so it will
    > > > not hold any entries from previous months. This is how I have been doing
    > > > this for a year and have never had this type of problem. Any help would be
    > > > appreciated
    > > > --
    > > > Sandi Gardner
     
  6. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    RE: HELP - record keeps duplicating in other other queries

    If you only want to see this months stuff try this - like I said there is
    normally something else you can try

    Year([SandiesWorkField]) = Year(Now()) And Month([SandiesWorkField]) =
    Month(Now())

    Note, you "should" use the Year as this way you won't have to change the
    criteria each year (unless you want to see "each" june, july, aug, for
    "every" year since you started your DB)


    Or you can use the sql

    SELECT TableName.PirmaryKey, TableName.SandiesJobStuff,
    TableName.SandiesWorkField, etc, etc, etc
    FROM TableName
    WHERE (((Format([SandiesWorkField],"myyyy"))=Month(Date()) & Year(Date())));

    Obviously change the names to what you would normally

    --
    Wayne
    Manchester, England
    --
    Wayne
    Manchester, England.



    "Wayne-I-M" wrote:

    > No worries - there is always something your can try (well most the times)
    >
    > Try this
    >
    > June
    > USA >#06/01/2006# and <#30/06/2006#
    > UK >#01/06/2006# and <#30/06/2006#
    >
    >
    > July
    > USA >#07/01/2006# and <#31/07/2006#
    > UK >#01/07/2006# and <#31/07/2006#
    >
    >
    > August
    > USA >#08/01/2006# and <#08/31/2006#
    > UK >#01/08/2006# and <#31/08/2006#
    >
    > Etc, etc
    >
    > If this doesn't work can you post the sql of the query
    >
    > --
    > Wayne
    > Manchester, England.
    >
    >
    >
    > "Sandi" wrote:
    >
    > > I've tried that and it doesn't work, it will not keep the entry since it is
    > > looking for June 30. The reason I set it as >6/30/06 is because nothing will
    > > show up which is what I want so I can entry my July information. It still
    > > saves my entry in the June query and form. I don't understand why this is
    > > happening now and it never has before.
    > > --
    > > Sandi Gardner
    > >
    > >
    > > "Wayne-I-M" wrote:
    > >
    > > > Hi Sandi
    > > >
    > > > Set your criteria as
    > > >
    > > > >#06/30/2006#
    > > >
    > > > Hope this helps
    > > > --
    > > > Wayne
    > > > Manchester, England.
    > > >
    > > >
    > > >
    > > > "Sandi" wrote:
    > > >
    > > > > I have a database that I use to keep track of people in my office that I
    > > > > provide help to. Each month I create a new query for the month we are in to
    > > > > add new entries for the month. I created my July query like I have in the
    > > > > previous months and added my first entry. It keeps adding my July entry to
    > > > > the June query. I looked at my query in design view and it's based off my
    > > > > table and in the date field it's critera is set up as >6/30/2006 so it will
    > > > > not hold any entries from previous months. This is how I have been doing
    > > > > this for a year and have never had this type of problem. Any help would be
    > > > > appreciated
    > > > > --
    > > > > Sandi Gardner
     
  7. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Mon, 3 Jul 2006 10:34:01 -0700, Sandi
    <Sandi@discussions.microsoft.com> wrote:

    >I have a database that I use to keep track of people in my office that I
    >provide help to. Each month I create a new query for the month we are in to
    >add new entries for the month. I created my July query like I have in the
    >previous months and added my first entry. It keeps adding my July entry to
    >the June query. I looked at my query in design view and it's based off my
    >table and in the date field it's critera is set up as >6/30/2006 so it will
    >not hold any entries from previous months. This is how I have been doing
    >this for a year and have never had this type of problem. Any help would be
    >appreciated


    Rather than creating multiple queries to do the same job, might it not
    be simpler to use one parameter query? For the current month you could
    use a criterion

    >= DateSerial(Year(Date()), Month(Date()), 1)


    Your criterion for the June query will indeed return all dates in July
    - you're asking for all dates AFTER June 30. It sounds like it's doing
    precisely what you ask it to do. If you want to include only dates in
    June, and exclude earlier and later dates, the correct criterion would
    be either

    >= #6/1/2006# AND < #7/1/2006#


    or (more flexibly)

    >= DateSerial([Enter year:], [Enter month number:], 1) AND < DateSerial([Enter year:], [Enter month number:] + 1, 1)


    John W. Vinson[MVP]
     

Share This Page