Help Please

LordofTzeentch

New member
Local time
Today, 14:50
Joined
Nov 22, 2005
Messages
5
The current program i have has a combo box to grab a value from a table the program then looks this value up in a query and places the cost of the item in the variable Point. The code i have got works on 4 of the other combo boxes that are doing exactly the same but it doesnt work on this i get

Run time error '2770'

The object you refenced in the visual basics procedure as OLE object isnt an OLE object

The code is

Private Sub CmbEnchanted_Change()
Dim qdf As DAO.QueryDef
Dim prm As DAO.Parameter
Dim rst As DAO.Recordset
Dim Point As Integer

Set qdf = CurrentDb.QueryDefs("QryEnchantedPoints")
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm

Set rst = qdf.OpenRecordset()
Point = rst!Points
Set qdf = Nothing
Set rst = Nothing
End Sub

Any ideas of why im getting this and how i can correct it would be most appreciated
 
Hi,

Nothing leaps out at me, but it would help if you stepped through the code in the debugger to identify the line where the error occurs. Then post again to tell which line it is.

Keith.
 
woops knew i forgot to put something

The error occurs at

prm.Value = Eval(prm.Name)
 

Users who are viewing this thread

Back
Top Bottom