Results 1 to 3 of 3
  1. #1
    DORONKI11 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    4

    i have a question

    hello,



    i want to do a report that display the data according to a form.
    for example: in the form i write the name of the company and 2 dates and i click the button and it opens me a report that contains data about this specific company and between those two dates.
    i thought i could do this with creating queries and when you write in the form it changes the criterias (the criterions) of the queries and the report will be based on the queries.
    but i dunno how form can change the criterions of a query. or is there better way to display specific data according to a form.

    and i have related question: i did a form that has a sub form (i mean a table in my form) and textbox. i wanted that when you write in the text box, for instance, name of someone the subform display all the rows which contains this name. but i cant connect the textbox to the subform, it only displays the rows that which contains this name but it does it in it own order.

    can you please answer me?

    thank you very much,

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    I think that this video will help you

    http://www.datapigtechnologies.com/f...earchform.html

    Alan

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    To answer the first question in the Query that feeds the report in the criteria section of the appropriate Fields add the following:

    For the Date parameters:
    Between forms!frm_reporting!dtstart and forms!frm_reporting!dtend

    for the company parameter:
    forms!frm_Reporting!txt_Company

    forms points to the forms collection
    frm_reporting points to the specific form
    dtstart, dtend and cbo_Company point to the controls on the form for start date, end date and company. I use dt for all dates on a form and txt for text boxes.

    However I would recommend using a control box and preventing users from free typing which could result in erroneous reporting due to typing errors.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums