PC Review


Reply
Thread Tools Rate Thread

Acess database engine could not find the object '1'

 
 
=?Utf-8?B?QWxleCBBZ25ldw==?=
Guest
Posts: n/a
 
      4th Nov 2006
A command button that opened a form in Acess 2003 will no longer work in
Acess 2007. This button is has VBA code in its event procdure. Other buttons
that use VBA do manage to open Queries. Code below

Private Sub RecordSearch_Click()
On Error GoTo Err_RecordSearch_Click

Dim stDocName As String

stDocName = "RecordSearch"
DoCmd.OpenForm stDocName, acNormal, acEdit

Exit_RecordSearch_Click:
Exit Sub

Err_RecordSearch_Click:
MsgBox Err.Description
Resume Exit_RecordSearch_Click
End Sub

 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      4th Nov 2006
That code is straight out of a Microsoft wizard. Try this:

1. Locate the form in question and open it from the database window.
2. Carefully check the form name including all the spaces (if any)
3. Check to see if it is opening behind any other objects.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Alex Agnew" <Alex (E-Mail Removed)> wrote in message
news:B8429878-6046-47DC-A75A-(E-Mail Removed)...
>A command button that opened a form in Acess 2003 will no longer work in
> Acess 2007. This button is has VBA code in its event procdure. Other
> buttons
> that use VBA do manage to open Queries. Code below
>
> Private Sub RecordSearch_Click()
> On Error GoTo Err_RecordSearch_Click
>
> Dim stDocName As String
>
> stDocName = "RecordSearch"
> DoCmd.OpenForm stDocName, acNormal, acEdit
>
> Exit_RecordSearch_Click:
> Exit Sub
>
> Err_RecordSearch_Click:
> MsgBox Err.Description
> Resume Exit_RecordSearch_Click
> End Sub
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jet database engine could not find the object 'Expr...' Orgil Microsoft ADO .NET 3 27th Sep 2007 01:30 PM
Microsoft jet database engine can not find object Joe Bitterman Microsoft Access 2 10th May 2007 04:31 PM
"Microsoft Jet Database Engine could not find the object 'database =?Utf-8?B?Q01LNzQ3MQ==?= Microsoft Access 3 17th Oct 2006 01:56 AM
Microsoft Jet database engine could not find the object =?Utf-8?B?Um9sYW5k?= Microsoft Access 10 28th Nov 2005 09:48 PM
Jet database engine could not find object MSysDb John Duffus Microsoft Access 1 4th Aug 2003 08:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:27 PM.