A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

runtime error 2465: application-defined or object-defined error



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2010, 12:08 AM posted to microsoft.public.access.gettingstarted
vircalendar via AccessMonster.com
external usenet poster
 
Posts: 31
Default runtime error 2465: application-defined or object-defined error

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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201005/1

  #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

  #3  
Old May 21st, 2010, 12:58 AM posted to microsoft.public.access.gettingstarted
vircalendar via AccessMonster.com
external usenet poster
 
Posts: 31
Default runtime error 2465: application-defined or object-defined error

Thanks for your input. Unfortunately, neither change worked. The first lead
to an inability to define the variable (program stopped execution and asked
me to define the variable Time) and the second change left me with the same
runtime error.

John Spencer wrote:
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

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-

[quoted text clipped - 8 lines]

End Sub


--
Message posted via http://www.accessmonster.com

  #4  
Old May 22nd, 2010, 12:06 AM posted to microsoft.public.access.gettingstarted
vircalendar via AccessMonster.com
external usenet poster
 
Posts: 31
Default runtime error 2465: application-defined or object-defined error

I've figured it out. The problem was that I was using the name of the text
box (time) instead of the data source for that text box (timescheduled).

Rather than

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

or the suggested

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

The answer was

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

vircalendar wrote:
Thanks for your input. Unfortunately, neither change worked. The first lead
to an inability to define the variable (program stopped execution and asked
me to define the variable Time) and the second change left me with the same
runtime 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

[quoted text clipped - 22 lines]

End Sub


--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.