@
CJ_London
Have you tried a shorter date range to reduce the number of records to be returned?
The query will only return a year of records using the "Between [Forms]![Reports]![StartDate] And [Forms]![Reports]![EndDate]"
Have you taken a look at the data in sql server to see if there are some invalid values there? or the fields/tables have been changed in some way?
This was my first thought perhaps some invalid value and unfortunately I have no access to the SQL server.
how did you change the format? using the format function in your query? the format property of a control won't do it.
Yes, I did it this way and you are correct it didn't work
what do you mean by 'behind the form'? are you running the query with code or are you creating the query in code and executing it? (suspect the former, but just to confirm)
User enters the dates in the date fields on the reports form and clicks on the Trial Balance command button
I am running the query with code behind a command button on the form DoCmd.OpenQuery "Collate TX Sales Invoices", acNormal, acEdit which opens a report form DoCmd.OpenReport "EuroOBTrial Balance For Company", acViewPreview
assuming the former what if you run the query from the navigation pane (with your form open and the two fields completed), rather than manually populating the values. And with regards your code, have you disabled any error management whilst trying to resolve this issue?
I'll try and give this a try and no I have not disabled any error management whilst trying to resolve this issue
Thanks