View Single Post
  #2  
Old May 9th, 2010, 03:50 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default runtime error 2465: application-defined or object-defined error

Perhaps the problem is actually in this line and the line where the error is
generated is caused by the value in the orderby property

Forms![control]![worklist]![approved].Form.OrderBy =
"Forms![control]![worklist]![approved]![time]"

Try just inputting the [Time] as in
Forms![control]![worklist]![approved].Form.OrderBy = "[time]"
assuming Time is a field in the sub-form's source.

This line looks as if it is correctly formed
Forms![control]![worklist]![approved].Form.OrderBy0n = True

Although you might try
Forms![control]![worklist].Form![approved].Form.OrderBy0n = True


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

vircalendar via AccessMonster.com wrote:
I'm trying to use a button on a main form to change the sort order of a sub-
subform.When I execute the following, I get runtime error 2465: application-
defined or object-defined error. opting to debug, I find the line with
orderbyon highlighted. Anybody see what's wrong?


Private sub timesort_click()

Forms![control]![worklist]![approved].Form.OrderBy = "Forms![control]!
[worklist]![approved]![time]"
Forms![control]![worklist]![approved].Form.OrderBy0n = True

End Sub