I've been racking my brains all day about his problem. I have 2 forms, one form (FormA) is bound to a record set and displays one record at a time. The second form (FormB) is opened by clicking a command button on formA and contains 3 fields. Based on what the user enters into those 3 fields I compile a filter string which I want to apply to FormA.
I've tried the following in the code in FormB with no success:
This returns the error "You cancelled the previous operation"
I've also tried many other ways of doing this, like calling a method in FormA from FormB and passing in the condition. Then using the Me.Filter command in FormA also returns the same error and setting the focus to formA and running 'DoCmd.Applyfilter , strCondition' returns this error "The ApplyFilter operation was cancelled".
strCondition = "[DateTime] Between #" & Me.txtStart & "# And #" & Me.txtEnd & "#"
Depending on your local date format and date delimiter settings, you may need to first reformat data in the text fields, as Access accepts only the "mm/dd/yyyy" and "yyyy/mm/dd" formats and delimiters.