![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
error 2499
I have a form 'FmMessages" and a form 'FmLeads'.
'FmMessages', through code, opens 'FmMessages" if it is not already open. It then sets focus on 'FmLeads' and runs the following code: Dim rst As Object Dim Tid As Long If typetransfer = "Valid Number" Or typetransfer = "New Number" Then DoCmd.GoToRecord , , acNewRec Me.ID = Forms![FmMessages].testCode Set rst = Me.Recordset.Clone Tid = Me.ID If Not IsNull(DLookup("ID", "Contacts", "ID = " & Tid)) Then MsgBox "ID Number Already Exists", vbExclamation, "Taking you to that record" Me.Undo rst.FindFirst "ID = " & Tid Me.Bookmark = rst.Bookmark End If ....more code here End if All of this runs just fine if 'FmLeads' was closed and then opened by code in 'FmMessages'. My problem comes when the 'FmLeads' form is already open. The line: DoCmd.GoToRecord , , acNewRec now produces the following error: Run-time error '2499' "You can't use GoToRecord a"ction or method on an object in Design view" Needles to say, form 'FmLeads' is not open in design view, and it does have focus. Your help would be very much appreciated |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|