Problem with switchboard

Soegstad

Registered User.
Local time
Today, 20:52
Joined
Dec 3, 2003
Messages
53
Hi guys,
I just tried to copy a switchboard from one database to another, and I 'm now coming up with an error (see red font). The error msg is:
Compile error: Method or data member not found

*************
Private Function HandleButtonClick(intBtn As Integer)
' This function is called when a button is clicked.
' intBtn indicates which button was clicked.

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8

' An error that is special cased.
Const conErrDoCmdCancelled = 2501

Dim dbs As Database
Dim rst As Recordset

On Error GoTo HandleButtonClick_Err

' Find the item in the Switchboard Items table
' that corresponds to the button that was clicked.
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Switchboard Items", dbOpenDynaset)
rst.FindFirst "[SwitchboardID]=" & Me![SwitchboardID] & " AND [ItemNumber]=" & intBtn

' If no item matches, report the error and exit the function.
If (rst.NoMatch) Then
MsgBox "There was an error reading the Switchboard Items table."
rst.Close
dbs.Close
Exit Function
End If

******************


I've copied both the form and the table and also matched up the references so I don't understand why this doesn't work.
Any help is apprechiated.
Thanks alot!
Mads
 
only thing I can think of is to make sure that the form is still bound to the table..Peter
 
attach your database everything should be in order... make sure the names copied over.
 

Users who are viewing this thread

Back
Top Bottom