Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

Error 2499

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lp12 - 26 Jan 2006 12:39 GMT
Hi all,
I get an error: "You can't use the GoToRecord action or method on an object
in Design view."  the error is generating on the GoToRecord line. Its a table
based form and it happens when i try to open an employee twice. The table PK
is autonumber (ID).
Any suggestions?
Here is the code of my procedure:
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click

Dim stDocName As String
   Dim stLinkCriteria As String
   
   stDocName = "frm_verify_details"
   DoCmd.GoToRecord , , acNewRec
   Form.Refresh
   Form.Visible = False
   'DoCmd.Close
   DoCmd.OpenForm stDocName, , , stLinkCriteria
   

Exit_Command11_Click:
   Exit Sub

Err_Command11_Click:
          MsgBox " 111"
      Resume Exit_Command11_Click
End Sub
Wayne Morgan - 26 Jan 2006 14:23 GMT
I don't fully follow what you're saying. You say this happens when you try
to "open an employee twice", but I can't tell here where you're trying to
open the employee. If clicking the button is what does it, it appears that
you're hiding the form in the button's click event, so how is the button
visible to click it again in order to "open the employee twice". Also, I
don't see where you're assigning a value to strLinkCriteria to control what
record frm_verify_details shows when it opens.

Signature

Wayne Morgan
MS Access MVP

> Hi all,
> I get an error: "You can't use the GoToRecord action or method on an
[quoted text clipped - 26 lines]
>       Resume Exit_Command11_Click
> End Sub
Lp12 - 02 Feb 2006 12:56 GMT
My mistake......Thanks a lot Wayne for your notice.

> I don't fully follow what you're saying. You say this happens when you try
> to "open an employee twice", but I can't tell here where you're trying to
[quoted text clipped - 34 lines]
> >       Resume Exit_Command11_Click
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.