Hi
I have a form which passes 2 items in a selection formula to a crystal report. The first is a textbox and the second is a datePicker. the problem i am experiancing is that if i enter a date (in the dtpicker)say for instance 28/01/2008 the crystal report returns the data in the database correctly, however if i enter a date such as 01/01/2008 i get no data returned to my report even though there is data that is residing in the database. I tried every date between 01/01/2008 and 12/01/2008 and got the same result (and all had data that shoudl have been returned, however i can enter anydate past the 13 and get data. this works for every date from 13/01/2008 to 31/01/2008 I suspect there is problem with the way crystal is reading my date time It shouls be dd/mm/yyyy and appears to be set up on my machine, in the database, and in the crystal report as such.... Any Ideas? Here is my code which is passingthe formula
CODE
cryReceipt.DiscardSavedData = True
cryReceipt.SelectionFormula = ("{qryPayment.invoiceID} = " & txtOrderNum & " AND {qryPayment.DatePD} = #" & dtInvoicePd & "# ")
' crPurchase.ReplaceSelectionFormula ("{qryPurchases.PurchaseOrderDate} >=#" & DTPFrom & "# and {qryPurchases.PurchaseOrderDate} <=#" & DTPTo & "# ")
Debug.Print cryReceipt.SelectionFormula
cryReceipt.RetrieveDataFiles
cryReceipt.Action = 1
Thanks
Shannon