PC Review


Reply
Thread Tools Rate Thread

A2000 form ceases working under A2002

 
 
Alp Bekisoglu
Guest
Posts: n/a
 
      5th Dec 2011
Hi,

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] = " &
Me.occ_id
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.occ_hs_id

Exit_hsholdBtn_Click:
Exit Sub

Err_hsholdBtn_Click:
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
Me.Repaint
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
 
Reply With Quote
 
 
 
 
Alp Bekisoglu
Guest
Posts: n/a
 
      12th Dec 2011
Never mind people, I made a new form with exactly the same fields/
codes/etc... and it works! MS stuff.... quite normal.


On Dec 5, 10:08*pm, Alp Bekisoglu <alp.bekiso...@gmail.com> wrote:
> Hi,
>
> 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] = "&
> Me.occ_id
> * * DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.occ_hs_id
>
> Exit_hsholdBtn_Click:
> * * Exit Sub
>
> Err_hsholdBtn_Click:
> * * 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
> Me.Repaint
> 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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:30 PM.