Prev: Report Totals
Next: Run report without running access?
From: Summing multiple fields on a form on 25 Mar 2010 16:00 I've created a report. I would like for user to decide what dates they want to see on report. (I think I need a parameter???? query)? What type of query do I create where user is prompted to enter a 'Begin Date' and and 'End Date'.. and have that data appear on report. What are the steps to do this????? Note: My date is in short date format
From: HC on 25 Mar 2010 16:05 On Mar 25, 4:00 pm, Summing multiple fields on a form <Summingmultiplefieldsonaf...(a)discussions.microsoft.com> wrote: > I've created a report. I would like for user to decide what dates they want > to see on report. (I think I need a parameter???? query)? > > What type of query do I create where user is prompted to enter a 'Begin > Date' and and 'End Date'.. and have that data appear on report. > > What are the steps to do this????? > > Note: My date is in short date format Create a select query on citiria between fromdate to enddate Then create the report using this query. Hopes it help....
From: Summing multiple fields on a form on 25 Mar 2010 21:21 Thx Hc...but how do I make the query as part of the report??? "HC" wrote: > On Mar 25, 4:00 pm, Summing multiple fields on a form > <Summingmultiplefieldsonaf...(a)discussions.microsoft.com> wrote: > > I've created a report. I would like for user to decide what dates they want > > to see on report. (I think I need a parameter???? query)? > > > > What type of query do I create where user is prompted to enter a 'Begin > > Date' and and 'End Date'.. and have that data appear on report. > > > > What are the steps to do this????? > > > > Note: My date is in short date format > > Create a select query on citiria between fromdate to enddate > > Then create the report using this query. > > > Hopes it help.... > > > > . >
From: Duane Hookom on 26 Mar 2010 10:18 Do yourself a favor and create a form with a couple text boxes [txtStartDate] and [txtEndDate] for the user to enter the dates. Then use the command button wizard to create a button to open your report. This should create code like: Private Sub cmdOpenReport_Click() On Error GoTo Err_cmdOpenReport_Click Dim stDocName As String '== add these lines to match your field and control names == Dim strWhere As String If Not IsNull(Me.txtStartDate) Then strWhere = strWhere & " AND [YourDateField] >= #" & _ Me.txtStartDate & "# " End If If Not IsNull(Me.txtEndDate) Then strWhere = strWhere & " AND [YourDateField] <= #" & _ Me.txtEndDate & "# " End If '=========================================== stDocName = "Order Details" 'add two commas and strWhere to the next line DoCmd.OpenReport stDocName, acPreview, , strWhere Exit_cmdOpenReport_Click: Exit Sub Err_cmdOpenReport_Click: MsgBox Err.Description Resume Exit_cmdOpenReport_Click End Sub -- Duane Hookom Microsoft Access MVP "Summing multiple fields on a form" wrote: > I've created a report. I would like for user to decide what dates they want > to see on report. (I think I need a parameter???? query)? > > What type of query do I create where user is prompted to enter a 'Begin > Date' and and 'End Date'.. and have that data appear on report. > > What are the steps to do this????? > > Note: My date is in short date format
|
Pages: 1 Prev: Report Totals Next: Run report without running access? |