Error message: Communicating with the OLE Server or ActiveX Contro

P

Paul Heinisch

I keep getting this error message:
The expression On Click you entered...a problem occurred while [database
name] was communicating with the OLE server of ActiveX Control. I did a shift
alt f11 and it displayes a 502473 in the bottom right-hand corner of the
messagebox. I'm not sure why this is occuring...

here is the code in question:

Private Sub project_id_Click()
On Error GoTo project_id_Click_Err

On Error Resume Next
If (Form.Dirty) Then
DoCmd.RunCommand acCmdSaveRecord
End If
If (MacroError.Number <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
Exit Sub
End If
On Error GoTo 0
DoCmd.OpenForm "Project - Details", acNormal, "", "[project_id]=" &
Nz(project_id, 0), , acNormal
If (Not IsNull(project_id)) Then
TempVars.Add "CurrentID", "[project_id]"
End If
If (IsNull(project_id)) Then
TempVars.Add "CurrentID",
"Nz(DMax(""[project_id]"",[Form].[RecordSource]),0)"
End If
DoCmd.Requery ""
DoCmd.SearchForRecord , "", acFirst, "[project_id]=" & TempVars!CurrentID
TempVars.Remove "CurrentID"

Please help - thanks
 
P

Paul Heinisch

When I try this in a Macro form, I get an error number 2950...if that helps...
 

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