Welcome to SPN

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

Sign Up Now!

How do I make access ask for info to filter report

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

  1. Candace

    Candace
    Expand Collapse
    Guest

    I've set up a database and my boss wants a box to come up asking which month
    he wants the report for. Then he wants the database to automatically filter
    for the informaiton for that month. Is there any way to do this? If so,
    how???
     
  2. Loading...


  3. Leah

    Leah
    Expand Collapse
    Guest

    You can create a query that has an input box as a filter. Go to
    queries and create a new one. Make sure to put the month as one of the
    fields in your query. In CRITERIA, type
    Like [Enter the Month Desired]
    in the space provided. This creates a filter so that when the query is
    run, it will only return results that have the entered criteria in that
    field. When you run the query, it will bring up a prompt to enter the
    month.

    If the date field is formatted differently than just month, you will
    have to format the input of data differently.
     
  4. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    If you simply insert [Month] in the criteria row of the query then you will
    get all answers for EACH year with that month in the date. If thats what you
    want then thats what you need to do

    To restrict the answer to a month of This Year then use something like

    Between DateSerial(Year(Date()),[Enter month],1) And
    DateAdd("d",-1,DateAdd("m",1,DateSerial(Year(Date()),[Enter month],1)))

    Hope this helps

    Or something like that

    Hope this helps


    --
    Wayne




    "Candace" wrote:

    > I've set up a database and my boss wants a box to come up asking which month
    > he wants the report for. Then he wants the database to automatically filter
    > for the informaiton for that month. Is there any way to do this? If so,
    > how???
     
  5. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    Candace wrote:
    > I've set up a database and my boss wants a box to come up asking
    > which month he wants the report for. Then he wants the database to
    > automatically filter for the informaiton for that month. Is there
    > any way to do this? If so, how???


    In a query on which the report is based type in [?] in the criteria
    line of the field you are filtering on.

    --
    Joseph Meehan

    Dia duit
     
  6. Candace

    Candace
    Expand Collapse
    Guest

    Thanks alot. I have one other question. IS there a certain format I have to
    put in for the date? I have an input mask that formats it as mm/dd/yyyy but
    that box only asks for the month and it's not giving me any information in my
    table

    "Leah" wrote:

    > You can create a query that has an input box as a filter. Go to
    > queries and create a new one. Make sure to put the month as one of the
    > fields in your query. In CRITERIA, type
    > Like [Enter the Month Desired]
    > in the space provided. This creates a filter so that when the query is
    > run, it will only return results that have the entered criteria in that
    > field. When you run the query, it will bring up a prompt to enter the
    > month.
    >
    > If the date field is formatted differently than just month, you will
    > have to format the input of data differently.
    >
    >
     
  7. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    If you just use a parameter of "what month do you want" or something that
    only asks for a month you will get a report for that month "for each year".
    So you may get a report that includes details of the month of May for each
    year since the D Base was created.

    --
    Wayne




    "Candace" wrote:

    > Thanks alot. I have one other question. IS there a certain format I have to
    > put in for the date? I have an input mask that formats it as mm/dd/yyyy but
    > that box only asks for the month and it's not giving me any information in my
    > table
    >
    > "Leah" wrote:
    >
    > > You can create a query that has an input box as a filter. Go to
    > > queries and create a new one. Make sure to put the month as one of the
    > > fields in your query. In CRITERIA, type
    > > Like [Enter the Month Desired]
    > > in the space provided. This creates a filter so that when the query is
    > > run, it will only return results that have the entered criteria in that
    > > field. When you run the query, it will bring up a prompt to enter the
    > > month.
    > >
    > > If the date field is formatted differently than just month, you will
    > > have to format the input of data differently.
    > >
    > >
     
  8. Candace

    Candace
    Expand Collapse
    Guest

    Thanks!

    "Wayne-in-Manchester" wrote:

    > If you just use a parameter of "what month do you want" or something that
    > only asks for a month you will get a report for that month "for each year".
    > So you may get a report that includes details of the month of May for each
    > year since the D Base was created.
    >
    > --
    > Wayne
    >
    >
    >
    >
    > "Candace" wrote:
    >
    > > Thanks alot. I have one other question. IS there a certain format I have to
    > > put in for the date? I have an input mask that formats it as mm/dd/yyyy but
    > > that box only asks for the month and it's not giving me any information in my
    > > table
    > >
    > > "Leah" wrote:
    > >
    > > > You can create a query that has an input box as a filter. Go to
    > > > queries and create a new one. Make sure to put the month as one of the
    > > > fields in your query. In CRITERIA, type
    > > > Like [Enter the Month Desired]
    > > > in the space provided. This creates a filter so that when the query is
    > > > run, it will only return results that have the entered criteria in that
    > > > field. When you run the query, it will bring up a prompt to enter the
    > > > month.
    > > >
    > > > If the date field is formatted differently than just month, you will
    > > > have to format the input of data differently.
    > > >
    > > >
     
  9. Candace

    Candace
    Expand Collapse
    Guest

    I appreciate you guys trying but neither of these is working. When I type
    Like [Enter the Month Desired] it asks what month I want but gives me a blank
    table. The field names are there but no data. [Month] gives me an error and
    [?] completely confuses it. Does it matter what format my dates are in?
    The input mask I'm using is mm/dd/yyyy. Oh and it's Access 2000


    "Leah" wrote:

    > You can create a query that has an input box as a filter. Go to
    > queries and create a new one. Make sure to put the month as one of the
    > fields in your query. In CRITERIA, type
    > Like [Enter the Month Desired]
    > in the space provided. This creates a filter so that when the query is
    > run, it will only return results that have the entered criteria in that
    > field. When you run the query, it will bring up a prompt to enter the
    > month.
    >
    > If the date field is formatted differently than just month, you will
    > have to format the input of data differently.
    >
    >
     
  10. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    Enter this in the criteria row of the Date Field on the query

    Between DateSerial(Year(Date()),[Enter month],1) And
    DateAdd("d",-1,DateAdd("m",1,DateSerial(Year(Date()),[Enter month],1)))

    Then when you open the query simply enter 01 for Jan, 02 for Feb, 03 for Mar
    etc etc.

    A good idea would be to open the query using a combo box with the Jan Feb
    Mar etc in column 1 and the 01, 02 03 etc in the 2nd column. Make sure you
    set the bound colum to 2



    --
    Wayne




    "Candace" wrote:

    > I appreciate you guys trying but neither of these is working. When I type
    > Like [Enter the Month Desired] it asks what month I want but gives me a blank
    > table. The field names are there but no data. [Month] gives me an error and
    > [?] completely confuses it. Does it matter what format my dates are in?
    > The input mask I'm using is mm/dd/yyyy. Oh and it's Access 2000
    >
    >
    > "Leah" wrote:
    >
    > > You can create a query that has an input box as a filter. Go to
    > > queries and create a new one. Make sure to put the month as one of the
    > > fields in your query. In CRITERIA, type
    > > Like [Enter the Month Desired]
    > > in the space provided. This creates a filter so that when the query is
    > > run, it will only return results that have the entered criteria in that
    > > field. When you run the query, it will bring up a prompt to enter the
    > > month.
    > >
    > > If the date field is formatted differently than just month, you will
    > > have to format the input of data differently.
    > >
    > >
     

Share This Page