Run-time error '2448'

james_IT

Registered User.
Local time
Today, 09:33
Joined
Jul 5, 2006
Messages
208
hi,

ive got a search form with a list box in it. when i dbl click it opens a form with that record. it works fine however i always get a run-time error '2448' message saying that i can't assign a value to this object. does this mean i cant change the PK or something. i can see that the form has opened to the correct record behind the message, however i dont want the debug message to appear.

any ideas?

thanks
 
Go into debug and see what line of code is highlighted when you get the error.
 
Private Sub List30_DblClick(Cancel As Integer)
Dim rs As Object

DoCmd.OpenForm "frmEditEvent"
Forms!frmEditEvent.[EventID] = Me.List30.Column(0)
DoCmd.Close acForm, "frmEventSearch"
End Sub
 
I'm not sure what you are trying to accomplish but why not just set the WhereCondition argument of the OpenForm command and drop the line that gives you the error. Or maybe just pass the value in the OpenArgs argument and do a FindFirst in the On:oad event of the next form.
 
no offense but i have no idea what you just said...im not that advanced yet... :(
 
Sorry. Try this code:
Code:
Private Sub List30_DblClick(Cancel As Integer)

Dim strWhere As String

strWhere = "[EventID] = " & Me.List30.Column(0)

DoCmd.OpenForm "frmEditEvent", , , strWhere 
DoCmd.Close acForm, "frmEventSearch"

End Sub
 

Users who are viewing this thread

Back
Top Bottom