Error 429 in Runtime

D

Doctor

Error 429: ActiveX component can't create the object

I believe I have narrowed down the reason for my error. But I need help
fixing it.

I have Access 2007 and received the error when I used the application in
Runtime on a computer that only has the runtime installed.

I found out on msdn that this error in runtime was caused by the specific
way that I declared an object. Previously I had this code in a startup
function:
Dim app as new access.application
app.setoption "Move After Enter",0
app.setoption "Arrow Key Behaviour",1

I changed it to this: But I am still receiving the error, probably because I
do not fully understand the GetObject method. The msdn only identified the
problem and didn't clearly illustrate the solution. Have I done this
correctly?
Dim app As Object
app = GetObject(, "Access.Application")
app.SetOption "Move After Enter", 0
app.SetOption "Arrow Key Behavior", 1

I've noticed that it is hard to determine the exact problem when you are
only in a runtime environment. There is one other Function that could be
causing the error. I posted it below:

Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As DAO.Database, prp As DAO.Property
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Set dbs = Nothing
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top