Having user choose a report and date range (1 Viewer)

tracey75

Registered User.
Local time
Today, 08:32
Joined
Feb 18, 2000
Messages
50
I want to make a form that the user can choose a date range for a report that they choose. They will have no toolboxes or design view. They only have the basic needs. How can i create this for a date range report for only users. I dont know VB or macros i'm learning all of this just by playing with it. PLEASE HELP IF YOU CAN!!
 

dennyryan

Registered User.
Local time
Today, 08:32
Joined
Dec 21, 1999
Messages
45
the way I do this is to use the date fields on the form as parameters in the query that is the recordsource for the report.

if we assume that your form, Form1, has two input fields: txtDate1 and txtDate2

in the query used for the report have the following criteria under the date field:

Between forms![Form1].[txtDate1] and forms![Form1].[txtdate2]

On your form you would have a command button that would create the report once the date fields are filled in.

This is kind of a general overview but it may give you enough to get started.

Denny
 

tracey75

Registered User.
Local time
Today, 08:32
Joined
Feb 18, 2000
Messages
50
I'am really frustrated with this! I need help! I dont know VB but I got a code from the internet on this and i dont know if I did it right I need someone to look at this code and PLEASE HELP ME!

Private Sub Command4_Click()
If IsNull(Me.StartDate) Or IsNull(Me.EndDate) Then
MsgBox "Both dates are required"
Else
'Note: Enter next 3 lines a single line.
DoCmd.OpenReport "Help Desk Query2", , ,
"[Person with Problem] Between #" & Format(Me.StartDate, "mm/dd/yyyy")
& "# And #" & Format(Me.EndDate, "mm/dd/yyyy") & "#"
End If

End Sub

ANY SUGGESTIONS WILL HELP ME
THANK YOU IN ADVANCED
 

Carol

Registered User.
Local time
Today, 08:32
Joined
Jan 15, 2000
Messages
280
Are you using a query for your underlying source for the report? Most of my reports are date driven by the user. I can e-mail you a simple sample that you can set up using this type of system where the user inputs a "From" date and a "To" in a dialog form box and this would bring up the report to correspondence with the dates chosen. I use the On Open and On Close in the report paramaters.
 

tracey75

Registered User.
Local time
Today, 08:32
Joined
Feb 18, 2000
Messages
50
could you please email me the code you use maybe it will help me

Thank you
 

Carol

Registered User.
Local time
Today, 08:32
Joined
Jan 15, 2000
Messages
280
Check your e-mail. I have sent a small database including tables, queries, form and a report. Maybe this will help in your data selection criteria for end users. This database is made in 2000.
 

Desiderata

Registered User.
Local time
Today, 00:32
Joined
Oct 25, 2012
Messages
13
Carol, This sample database looks like my speed. I'm a R-E-A-L noob. I have a report that represents 8 queries that each require date (To and From) entries. Entering the date range multiple times invites error. A sample database would be the sort of instruction that would be great.
 

Users who are viewing this thread

Top Bottom