Report repeating records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tulikapuri
    New Member
    • Feb 2007
    • 55

    #31
    Originally posted by Rabbit
    You have to have the form open before you run the query. The dates also need to be filled into the controls before you run the query.
    I have no idea how can i do this? can you plz describe me in detail? How do i open the form ?

    I was trying to do it using the macro named frmreports which will openform frmreports and have set the filter for the form as Between [Forms]![frmReports]![txtStartDate] And [Forms]![frmReports]![txtEndDate] and then in the next line i set it up to open the report but i dont see any data now.

    I know what you are talking about, but i dont know how to get there?

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #32
      Originally posted by tulikapuri
      I have no idea how can i do this? can you plz describe me in detail? How do i open the form ?

      I was trying to do it using the macro named frmreports which will openform frmreports and have set the filter for the form as Between [Forms]![frmReports]![txtStartDate] And [Forms]![frmReports]![txtEndDate] and then in the next line i set it up to open the report but i dont see any data now.

      I know what you are talking about, but i dont know how to get there?
      You open the form by double clicking the form.

      Then you fill the dates by clicking in the control and typing in a start date. Then you click in the end date control and type in an end date.

      Then you double click the report to open that.

      Comment

      • tulikapuri
        New Member
        • Feb 2007
        • 55

        #33
        I did all this..........

        I have a frm named frmreports and have two text boxes txtstartdate and txtenddate, now i have a command set in the form to open the report but it is empty even if i enter the dates, wot should i do?

        I tried setting up a macro such that it opens the frmreport and then opens the frmreport.

        Thanks Much

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #34
          Originally posted by tulikapuri
          I did all this..........

          I have a frm named frmreports and have two text boxes txtstartdate and txtenddate, now i have a command set in the form to open the report but it is empty even if i enter the dates, wot should i do?

          I tried setting up a macro such that it opens the frmreport and then opens the frmreport.

          Thanks Much
          Try putting # hash signs # around the dates in the criteria. Between #date# and #date# where date is the field on the form.

          Comment

          • tulikapuri
            New Member
            • Feb 2007
            • 55

            #35
            No nothing is working , everything else is perfect Rabbit, plz. tell me how can i get the parameters entered only once, and not three times, i cant do it?

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #36
              What's the criteria for the queries?

              Comment

              • tulikapuri
                New Member
                • Feb 2007
                • 55

                #37
                Hi ,

                the criteria for the query is Between [Forms]![frmReports]![txtStartDate] And
                [Forms]![frmReports]![txtEndDate].

                I also have the frmreports in the form and i am trying to enter the above query in the individual queries for daily sand lab, friabilty and loimolding but when i try to open the report based on these queries it promts me for the txtstartdate and txtenddate three times, it will be good and time saving if i can enter it only once, i am sure there is a way and i am revolving around it but i am really sorry that i am not able to get to it.

                Your help will be highly appreciated.

                Thanks,

                Comment

                • Denburt
                  Recognized Expert Top Contributor
                  • Mar 2007
                  • 1356

                  #38
                  If we can back up a few steps I think something major was missed.

                  Originally posted by Rabbit
                  You said the primary keys are the numbers but you never told me which of your fields are numbers.

                  Can you post the SQL of your query?
                  You posted the SQL to your queries and I have no idea how they may be related to each other. You must define a primary key in the main Table for the Main SQL then Foriegn Keys in the sub reports SQL query tables. If these don't exist then you can't link the sub reports to the master and this would cause such a problem... Posssible or did I miss somthing?

                  Comment

                  • Rabbit
                    Recognized Expert MVP
                    • Jan 2007
                    • 12517

                    #39
                    Originally posted by tulikapuri
                    Hi ,

                    the criteria for the query is Between [Forms]![frmReports]![txtStartDate] And
                    [Forms]![frmReports]![txtEndDate].

                    I also have the frmreports in the form and i am trying to enter the above query in the individual queries for daily sand lab, friabilty and loimolding but when i try to open the report based on these queries it promts me for the txtstartdate and txtenddate three times, it will be good and time saving if i can enter it only once, i am sure there is a way and i am revolving around it but i am really sorry that i am not able to get to it.

                    Your help will be highly appreciated.

                    Thanks,
                    Did you try Between #[Forms]![frmReports]![txtStartDate]# And
                    #[Forms]![frmReports]![txtEndDate]#

                    Comment

                    • tulikapuri
                      New Member
                      • Feb 2007
                      • 55

                      #40
                      Originally posted by Rabbit
                      Did you try Between #[Forms]![frmReports]![txtStartDate]# And
                      #[Forms]![frmReports]![txtEndDate]#
                      There are two ways of adding subreport either do it manually from controls and then subreport or else have the query set up such that it takes the fields from all the tables and generate one report.

                      If i use this criterion Between [Forms]![frmReports]![txtStartDate] And
                      [Forms]![frmReports]![txtEndDate], for the query generated report it works, but if i manually add the subreports by dragging them in the report header, i dont see anything, and it asks me 12 times to enter the startdate and enddate.

                      I dont want to use the query to generate the report since the report doesnt come out to be in the format required, i can only get it if i do it via dragging the subreports.

                      Do u think this cud have an effect on wott we have been discussing ?

                      Comment

                      • Rabbit
                        Recognized Expert MVP
                        • Jan 2007
                        • 12517

                        #41
                        I'm getting confused, can you paste your current SQL?

                        Comment

                        • tulikapuri
                          New Member
                          • Feb 2007
                          • 55

                          #42
                          SQL of query?

                          Comment

                          • tulikapuri
                            New Member
                            • Feb 2007
                            • 55

                            #43
                            I have a query where i join all the tables i want in the report, i add the criterion in the date as Between #[Forms]![frmReports]![txtStartDate]# And
                            #[Forms]![frmReports]![txtEndDate], but when i generate the report , i dont use this query, i use individual reports which are based on different queries, becuase if i do it using the query the report doesnt come out in the format desired.

                            So i am making a report with subreports by draging the report in the report header. Now since this report is not linked to the query where i add the criterion hence i think its not working, but when i generate a report using the query it works.

                            Comment

                            • Rabbit
                              Recognized Expert MVP
                              • Jan 2007
                              • 12517

                              #44
                              Let's try to clarify. The setup is like this?
                              Code:
                                Query1     Query2     Query3
                                   ^          ^          ^
                              Subreport1 Subreport2 Subreport3
                                   ^          ^          ^
                                          Main Report

                              Comment

                              • tulikapuri
                                New Member
                                • Feb 2007
                                • 55

                                #45
                                Originally posted by Rabbit
                                Let's try to clarify. The setup is like this?
                                Code:
                                  Query1     Query2     Query3
                                     ^          ^          ^
                                Subreport1 Subreport2 Subreport3
                                     ^          ^          ^
                                            Main Report
                                yess thts right

                                Comment

                                Working...