A2000 form ceases working under A2002


Alp Bekisoglu


I have an application I used to run under Access2000. Now I try to run
it under Access2002 and am getting "OpenForm action cancelled" error.
This is a form triggered via a button control on a main form which has
several other such cmd buttons but all of them are working. System is
Win XP SP3 with Office XP.
The only difference with other forms is that this receiving an OpenArg
value which I use in code to alter the form caption based on OnOpen
event of the form. I have no missing references indicated.
CmdButton code on the main form:

Private Sub hsholdBtn_Click()
On Error GoTo Err_hsholdBtn_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fr_tenants"

stLinkCriteria = "[ten_house_no] = " & Me![occ_hs_id]
stLinkCriteria = stLinkCriteria & " And [ten_occupant_id] = " &
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.occ_hs_id

Exit Sub

MsgBox Err.Description
Resume Exit_hsholdBtn_Click

End Sub

The code behind the opening form:

Private Sub Form_Close()
Dim frnm As String
frnm = Me.Caption
Me.Caption = Right(frnm, 26)
End Sub

Private Sub Form_Open(Cancel As Integer)
Dim house As Long
Dim frnm As String
frnm = Me.Caption
house = Me.OpenArgs
Me.Caption = house & " NO.LU " & frnm
End Sub

The form also does not open by itself, returning error "The expression
On Open you entered as the event property setting produced the
following error: A problem occured while TheProgram was communicating
with the OLE Server or ActiveX Control"

Just couldn't figure out what's wrong.
Thanks in advance.


Alp Bekisoglu

Never mind people, I made a new form with exactly the same fields/
codes/etc... and it works! MS stuff.... quite normal.

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