LordofTzeentch
New member
- Local time
- Today, 09:24
- 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
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