Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Me Modify Code

Status
Not open for further replies.

mlocurci

MIS
Oct 17, 2001
210
US
My db needs to adapt to a new data feed. Instead of having date and time seperate, I will now receive that as one field, eg. Datestamp. While it may be easier from the front end, my db depended a lot on that format, but there is no going back at this point. I need this code to understand timestamp and allow it to be seemless. My thought is to tell it to run from Startdate 12:01AM to EndDate 12:00AM. Any ideas how to do that?

Thanks!

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 "Manifest", acViewPreview, , "[Date] Between #" & Format(Me.StartDate, "mm\/dd\/yyyy") & "# And #" & Format(Me.EndDate, "mm\/dd\/yyyy") & "#"
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top