Modifying Date Range 2

  • Thread starter pushrodengine via AccessMonster.com
  • Start date
P

pushrodengine via AccessMonster.com

Now, I need to modify the expression:

Between [Forms].[frmReport].[StartDate] And [Forms].[frmReport].[EndDate]

Is there a way to modify the expression above so that:

[StartDate] mm/dd/yyyy

mm=01, dd =01, and yyyy= the year entered

and

[EndDate] mm/dd/yyyy

mm= the month entered, dd= the day entered, and yyyy= the year entered


A date is entered into [StartDate] and [EndDate] from the form “frmReport†in
the format of mm/dd/yyyy.


Thanks Again
 
G

Guest

Rather than modifying the query's parameters why not ensure that the date in
the StartDate control on the form is always 1 January of the year in which
the date entered by the user falls by putting the following in the control's
AfterUpdate event procedure:

Dim dtmDate as Date

dtmDate = DateSerial(Year(Me.StartDate),1,1)
Me.StartDate = Format(dtmDate,"mm/dd/yyyy")

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top