I have a report "rptCageinv" based on a query "qryCageInvReport", that looks at the "CAGEINVCOUNT" table.
I am trying to pass the Start Date and End Date parameters to the query via a small form "CageInvReportDialog" that contains 2 unbound fields and a Cmdbutton:
txtStartDate
txtEndDate
begin button code
I added the following to the query criteria under the INSERTDATE column:
Here are the problems I am having:
1.)After I enter the same value in both txtStartDate and txtEndDate (1/27/2005 9:27:01 AM) I am prompted again by the query for the same information. (i.e Forms!cageinvreportdialog!txtStartDATE and Forms!cageinvreportdialog!txtendDATE)?
2.)The INSERTDATE default on the form is set to now(), but I want to be able to search by date only not date/time?
INSERTDATE value in table = 1/27/2005 9:27:01 AM. I would like to enter 1/27/2005 in txtxStartDate and txtEndDate.
Many thanks for any help you can provide
I am trying to pass the Start Date and End Date parameters to the query via a small form "CageInvReportDialog" that contains 2 unbound fields and a Cmdbutton:
txtStartDate
txtEndDate
begin button code
Code:
Private Sub Image20_Click()
DoCmd.close
DoCmd.OpenReport "rptcageinv", acViewPreview, "qrycageinvreport"
End Sub
I added the following to the query criteria under the INSERTDATE column:
Code:
Between nz([Forms]![cageinvreportdialog]![txtstartDATE],#1/1/1900#) And nz([Forms]![cageinvreportdialog]![txtendDATE],#12/31/3000#)
Here are the problems I am having:
1.)After I enter the same value in both txtStartDate and txtEndDate (1/27/2005 9:27:01 AM) I am prompted again by the query for the same information. (i.e Forms!cageinvreportdialog!txtStartDATE and Forms!cageinvreportdialog!txtendDATE)?
2.)The INSERTDATE default on the form is set to now(), but I want to be able to search by date only not date/time?
INSERTDATE value in table = 1/27/2005 9:27:01 AM. I would like to enter 1/27/2005 in txtxStartDate and txtEndDate.
Many thanks for any help you can provide