In the criteria, put Between [Form]![frmPreviewReprtDate].[Beginning Rpt Date] And [Form]![frmPreviewReprtDate].[End Rpt Date]
HTH, Toby ----- Original Message ----- From: "Valerie" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, June 14, 2005 11:00 AM Subject: [AccessDevelopers] Re: Before and After > Thank you very much Dawn for your information. I tried that and yes > it does work just fine. But I found I have to enter a specific date > that had entries else in the Report I just got an "Error" message. > What I want to be able to do is open a Range of Date entries. Like > from say May 15, 2005 thru June 5, 2005. Do you have any other ideas > to help me please? Thanks - Valerie > > --- In [email protected], "Crosier, Dawn" > <[EMAIL PROTECTED]> wrote: > > Valerie - > > > > What I do is have the record source of the Report based on a query. > > Then in the criteria field for the query for the Beginning date say > > [Form]![frmPreviewReprtDate].[Beginning Rpt Date] That way the > criteria > > of the report gets its value from the form. > > > > Hope that helps. > > > > Dawn Crosier > > Application Specialist > > Microsoft MVP > > "Education Lasts a Lifetime" > > > > -----Original Message----- > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On Behalf Of Valerie > > Sent: Monday, June 13, 2005 7:59 AM > > To: [email protected] > > Subject: [AccessDevelopers] Before and After > > > > I want to have a form open where the Before and After Dates are > entered > > and then a report opens up showing only those items covered by the > > dates. > > I have a form named "frmPreviewReportDate" that has two unbound > boxes > > for both Before and After, and a button. The code I have is as > follows > > (the [Beginning Rpt Date] and the [Ending Rpt Date] are > the "Names" of > > the unbound fields and my Report is named "rptClientsCostsByDate". > The > > "Control Source" for each unbound box is =[tblExpenses]![Date]) > when I > > try to in "Open" mode the form I get a "Runtime Error 94". What am > I not > > doing incorrectly please. > > I have another file where the Before and After form does work and > keep > > refering back and forth to it and yet get I cannot this one to > work. > > Thank you - Valerie: > > > > > > Private Sub Form_Open(Cancel As Integer) > > Me.Caption = Me.OpenArgs > > End Sub > > Private Sub Preview_Click() > > If IsNull([Beginning Rpt Date]) Or IsNull([Ending Rpt Date]) > Then > > MsgBox "You must enter both beginning and ending dates." > > DoCmd.GoToControl "rptClientsCostsByDate" > > Else > > If [Beginning Rpt Date] > [Ending Rpt Date] Then > > MsgBox "Ending date must be greater than Beginning > date." > > DoCmd.GoToControl "rptClientsCostsByDate" > > Else > > Me.Visible = False > > End If > > End If > > End Sub > > > > > > Please zip all files prior to uploading to Files section. > Yahoo! Groups Links > > > > > > Please zip all files prior to uploading to Files section. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessDevelopers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
