Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

active X component can't create object

Status
Not open for further replies.

ArchonSoft

Programmer
Jan 20, 2003
35
CA
Here is my code:

Private Sub btnFermer_Click()
On Error GoTo Err_btnFermer_Click

'variables
Dim rstWrite As DAO.Recordset
Dim msg As Integer
Dim dbsInOut As Database


'show confirmation message
msg = MsgBox(&quot;Votre statut a été mis à jour. Clickez sur <OK> pour revenir au menu principale.&quot;, vbOKOnly + vbInformation, &quot;Opération réussie!&quot;)


'Reference to the current database
>>> Set dbsInOut = CurrentDb

'reference to table historique
Set rstWrite = dbsInOut.OpenRecordset(&quot;historique&quot;, dbOpenDynaset)

'write change into table historique
With rstWrite
.AddNew
!Nom = Nom
!Statut = Statut
!Lieux = Lieux
!HeureRetour = HeureRetour
!SuiviAppels = SuiviAppels
!Commentaires = Commentaires
!Date = Now
.Update
End With

DoCmd.Close acForm, &quot;frmInOut&quot;
DoCmd.OpenForm &quot;frmStart&quot;


Exit_btnFermer_Click:
Exit Sub

Err_btnFermer_Click:
MsgBox Err.Description
Resume Exit_btnFermer_Click

End Sub

The problem seems to happen to the line mark with >>>
where I've got the error: active x component can't create object
But this database works well on all computers except one?

Help please
 
You may be having some sort of active X control registry problem on that one computer.

You can use a search engine to learn more about active X control registry.
 
Active X controls are registered on each individual computer. I ran into a similar problem. Although the Active X control ran just fine on my development machine, it didn't run on all target machines.

To test this, go to the target machine, and try to create a form using that same active X control.

If the control is not registered, you have to use Regsvr32 to register it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top