A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

The OpenForm action was cancelled since upgrade from 2003 to 2007



 
 
Thread Tools Display Modes
  #11  
Old December 5th, 2008, 12:32 PM posted to microsoft.public.access
DAVID HARRIS
external usenet poster
 
Posts: 17
Default The OpenForm action was cancelled since upgrade from 2003 to 2

I completed the steps and replied with the following.

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I click the
button.
After pressing F5 th same error comes up.

"BruceM" wrote:

Dirk suggested a very specific course of action. How did that go? Are you
clear on how to set a break point and the rest of it?

If you are unclear about setting a break point, open the VBA editor. Click
the vertical bar to the left of the line:
DoCmd.OpenForm stDocName, , , stLinkCriteria

A red dod will appear in the vertical bar, and the line of code will be
highlighted. Click the button to run the code. It will stop at the
selected line. From there the instructions should be self-evident.

"David Harris" wrote in message
...
Hi,

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I click
the
button.

After pressing F5 th same error comes up.

Regards,

David

"Dirk Goldgar" wrote:

"David Harris" wrote in message
...
I opened the Personal Details page and instead of clicking on the button
I
tried to open up the form directly from the Forms list.
Nothing happens, No error message.


That leads me to believe that there is a problem with the criterion being
specified in your Open1stAccessCourse_Click() event procedure. As a
first
step to investigate this, set a breakpoint on the line

DoCmd.OpenForm stDocName, , , stLinkCriteria

Then trigger the procedure by clicking the button. When code execution
halts at the breakpoint, press Ctrl+G to bring up the Immediate window in
the VB editor, and enter this in the Immediate window:

?stLinkCriteria

When you press the Enter key after that line, the value of stLinkCriteria
should be displayed. Copy and paste that into a reply to this message,
so I
can see if there is anything odd about it. Then return to the VB editor
and
press F5 to let the code continue, and confirm that the error was raised
as
before.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)




  #12  
Old December 5th, 2008, 12:53 PM posted to microsoft.public.access
BruceM[_2_]
external usenet poster
 
Posts: 1,763
Default The OpenForm action was cancelled since upgrade from 2003 to 2

I didn't mean to jump in on the thread. You referred to [Client
Reference]=1577 as the Criteria, so I thought you were referring to
something other than the string stLinkCriteria. I thought I could provide
some clarification. My apologies for the misunderstanding

I will just suggest that you press F8 instead of F5 after the break point,
so that you can discover which line of code exactly is producing the error.

Also, when you say "nothing happens" when you try to open the form from the
database window (I assume that's what you mean by "forms list"), do you mean
it sits there and doesn't even begin to open?

"David Harris" wrote in message
...
I completed the steps and replied with the following.

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I click
the
button.
After pressing F5 th same error comes up.

"BruceM" wrote:

Dirk suggested a very specific course of action. How did that go? Are
you
clear on how to set a break point and the rest of it?

If you are unclear about setting a break point, open the VBA editor.
Click
the vertical bar to the left of the line:
DoCmd.OpenForm stDocName, , , stLinkCriteria

A red dod will appear in the vertical bar, and the line of code will be
highlighted. Click the button to run the code. It will stop at the
selected line. From there the instructions should be self-evident.

"David Harris" wrote in message
...
Hi,

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I
click
the
button.

After pressing F5 th same error comes up.

Regards,

David

"Dirk Goldgar" wrote:

"David Harris" wrote in
message
...
I opened the Personal Details page and instead of clicking on the
button
I
tried to open up the form directly from the Forms list.
Nothing happens, No error message.


That leads me to believe that there is a problem with the criterion
being
specified in your Open1stAccessCourse_Click() event procedure. As a
first
step to investigate this, set a breakpoint on the line

DoCmd.OpenForm stDocName, , , stLinkCriteria

Then trigger the procedure by clicking the button. When code
execution
halts at the breakpoint, press Ctrl+G to bring up the Immediate window
in
the VB editor, and enter this in the Immediate window:

?stLinkCriteria

When you press the Enter key after that line, the value of
stLinkCriteria
should be displayed. Copy and paste that into a reply to this
message,
so I
can see if there is anything odd about it. Then return to the VB
editor
and
press F5 to let the code continue, and confirm that the error was
raised
as
before.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)





  #13  
Old December 5th, 2008, 02:17 PM posted to microsoft.public.access
DAVID HARRIS
external usenet poster
 
Posts: 17
Default The OpenForm action was cancelled since upgrade from 2003 to 2

I pressed F8 instead of F5 and it then highlighted Msg Err.Description
After F8 again the error "The OpenForm action was cancelled" appears.

Yes when trying to open the form from the form list nothing happens.
In Office 2003 the form does open up from the form list.

"BruceM" wrote:

I didn't mean to jump in on the thread. You referred to [Client
Reference]=1577 as the Criteria, so I thought you were referring to
something other than the string stLinkCriteria. I thought I could provide
some clarification. My apologies for the misunderstanding

I will just suggest that you press F8 instead of F5 after the break point,
so that you can discover which line of code exactly is producing the error.

Also, when you say "nothing happens" when you try to open the form from the
database window (I assume that's what you mean by "forms list"), do you mean
it sits there and doesn't even begin to open?

"David Harris" wrote in message
...
I completed the steps and replied with the following.

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I click
the
button.
After pressing F5 th same error comes up.

"BruceM" wrote:

Dirk suggested a very specific course of action. How did that go? Are
you
clear on how to set a break point and the rest of it?

If you are unclear about setting a break point, open the VBA editor.
Click
the vertical bar to the left of the line:
DoCmd.OpenForm stDocName, , , stLinkCriteria

A red dod will appear in the vertical bar, and the line of code will be
highlighted. Click the button to run the code. It will stop at the
selected line. From there the instructions should be self-evident.

"David Harris" wrote in message
...
Hi,

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I
click
the
button.

After pressing F5 th same error comes up.

Regards,

David

"Dirk Goldgar" wrote:

"David Harris" wrote in
message
...
I opened the Personal Details page and instead of clicking on the
button
I
tried to open up the form directly from the Forms list.
Nothing happens, No error message.


That leads me to believe that there is a problem with the criterion
being
specified in your Open1stAccessCourse_Click() event procedure. As a
first
step to investigate this, set a breakpoint on the line

DoCmd.OpenForm stDocName, , , stLinkCriteria

Then trigger the procedure by clicking the button. When code
execution
halts at the breakpoint, press Ctrl+G to bring up the Immediate window
in
the VB editor, and enter this in the Immediate window:

?stLinkCriteria

When you press the Enter key after that line, the value of
stLinkCriteria
should be displayed. Copy and paste that into a reply to this
message,
so I
can see if there is anything odd about it. Then return to the VB
editor
and
press F5 to let the code continue, and confirm that the error was
raised
as
before.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)






  #14  
Old December 5th, 2008, 02:32 PM posted to microsoft.public.access
BruceM[_2_]
external usenet poster
 
Posts: 1,763
Default The OpenForm action was cancelled since upgrade from 2003 to 2

I expect you are saying it went to the MsgBox Err.Description line after the
OpenForm line. I would try removing the Where argument, and just open the
form, to see if the error is with the Where or with the action of opening
the form.
Although I have Access 2007 at home I am not very familiar with it yet, so I
will step out of the discussion for now and see if Dirk comes up with
something. Sorry if I have muddied the waters.

"David Harris" wrote in message
...
I pressed F8 instead of F5 and it then highlighted Msg Err.Description
After F8 again the error "The OpenForm action was cancelled" appears.

Yes when trying to open the form from the form list nothing happens.
In Office 2003 the form does open up from the form list.

"BruceM" wrote:

I didn't mean to jump in on the thread. You referred to [Client
Reference]=1577 as the Criteria, so I thought you were referring to
something other than the string stLinkCriteria. I thought I could
provide
some clarification. My apologies for the misunderstanding

I will just suggest that you press F8 instead of F5 after the break
point,
so that you can discover which line of code exactly is producing the
error.

Also, when you say "nothing happens" when you try to open the form from
the
database window (I assume that's what you mean by "forms list"), do you
mean
it sits there and doesn't even begin to open?

"David Harris" wrote in message
...
I completed the steps and replied with the following.

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I
click
the
button.
After pressing F5 th same error comes up.

"BruceM" wrote:

Dirk suggested a very specific course of action. How did that go?
Are
you
clear on how to set a break point and the rest of it?

If you are unclear about setting a break point, open the VBA editor.
Click
the vertical bar to the left of the line:
DoCmd.OpenForm stDocName, , , stLinkCriteria

A red dod will appear in the vertical bar, and the line of code will
be
highlighted. Click the button to run the code. It will stop at the
selected line. From there the instructions should be self-evident.

"David Harris" wrote in
message
...
Hi,

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I
click
the
button.

After pressing F5 th same error comes up.

Regards,

David

"Dirk Goldgar" wrote:

"David Harris" wrote in
message
...
I opened the Personal Details page and instead of clicking on the
button
I
tried to open up the form directly from the Forms list.
Nothing happens, No error message.


That leads me to believe that there is a problem with the criterion
being
specified in your Open1stAccessCourse_Click() event procedure. As
a
first
step to investigate this, set a breakpoint on the line

DoCmd.OpenForm stDocName, , , stLinkCriteria

Then trigger the procedure by clicking the button. When code
execution
halts at the breakpoint, press Ctrl+G to bring up the Immediate
window
in
the VB editor, and enter this in the Immediate window:

?stLinkCriteria

When you press the Enter key after that line, the value of
stLinkCriteria
should be displayed. Copy and paste that into a reply to this
message,
so I
can see if there is anything odd about it. Then return to the VB
editor
and
press F5 to let the code continue, and confirm that the error was
raised
as
before.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)







  #15  
Old December 5th, 2008, 03:50 PM posted to microsoft.public.access
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default The OpenForm action was cancelled since upgrade from 2003 to 2

"David Harris" wrote in message
...
Hi,

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I click
the
button.

After pressing F5 th same error comes up.



The criterion looks fine (provided that [Client Reference] is a numeric
field), so I think we can discard any idea that the problem is in this code.

I think, reading your conversation with BruceM, that I misunderstood
something you said before. I asked what happened when you opened the form
directly from the navigation pane, and you said "Nothing happens, No error
message." I thought that meant that the form opened correctly. Now I see
your reply to BruceM: "Yes when trying to open the form from the form list
nothing happens.
In Office 2003 the form does open up from the form list."

So the form does *not* open from the navigation pane? That means we have to
look at that form to see what's wrong.

Please open the form "Fm1/9 C1 Access Course" in design view, open its
property sheet, and post the details of its RecordSource property. If the
recordsource is a table, please post the list of fields in the table. If
the recordsource is a stored query, please post the SQL View of the query.
And if it's an in-line SQL statement, please post that statement.

Also, please verify whether (a) there is a control on the form named "Client
Reference", and (b) there is a control on the form whose ControlSource
property is "Client Reference".

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #16  
Old December 9th, 2008, 10:56 AM posted to microsoft.public.access
DAVID HARRIS
external usenet poster
 
Posts: 17
Default The OpenForm action was cancelled since upgrade from 2003 to 2

I opened up form "Fm1/9 C1 Access Course" in design view, right clicked in
the top left hand corner and selected properties.
The Record Source is Tb1 Personal Details.

The fields for that table are shown below.

There is a control on the form "Fm1/9 C1 Access Course" named "Client
Reference", and there is a control on the form whose ControlSource
property is "Client Reference".

Client Reference
First Name
Surname
Sex
Date of Birth
Address 1
Address 2
Post Code
Address Changed
Telephone
Mobile
County ID
Ethnic Origin ID
Next of Kin Details
Type of Accom ID
Referral Agency ID
Company Name ID
Contact name
ODW CaseWorker ID
Funded by ID
Funded 2 ID
Funded 3 ID
Educational Status ID
Employment Status ID
Unemployed forID
U16 Archive
U16 Flag
Access Start Date
Access Hour Participated
Access Completed
Exited Date
Exit Reason Ref
Old Ref No
Comments/Notes
Record Last Updated
Last Contact Hour
Reason
Team Option 1
Team Option 5
TeamID

"Dirk Goldgar" wrote:

"David Harris" wrote in message
...
Hi,

The Criteria returned was [Client Reference]=1577
This is the reference number for the prson's record I am on when I click
the
button.

After pressing F5 th same error comes up.



The criterion looks fine (provided that [Client Reference] is a numeric
field), so I think we can discard any idea that the problem is in this code.

I think, reading your conversation with BruceM, that I misunderstood
something you said before. I asked what happened when you opened the form
directly from the navigation pane, and you said "Nothing happens, No error
message." I thought that meant that the form opened correctly. Now I see
your reply to BruceM: "Yes when trying to open the form from the form list
nothing happens.
In Office 2003 the form does open up from the form list."

So the form does *not* open from the navigation pane? That means we have to
look at that form to see what's wrong.

Please open the form "Fm1/9 C1 Access Course" in design view, open its
property sheet, and post the details of its RecordSource property. If the
recordsource is a table, please post the list of fields in the table. If
the recordsource is a stored query, please post the SQL View of the query.
And if it's an in-line SQL statement, please post that statement.

Also, please verify whether (a) there is a control on the form named "Client
Reference", and (b) there is a control on the form whose ControlSource
property is "Client Reference".

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #17  
Old December 9th, 2008, 02:40 PM posted to microsoft.public.access
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default The OpenForm action was cancelled since upgrade from 2003 to 2

"David Harris" wrote in message
...
I opened up form "Fm1/9 C1 Access Course" in design view, right clicked in
the top left hand corner and selected properties.
The Record Source is Tb1 Personal Details.

The fields for that table are shown below.

There is a control on the form "Fm1/9 C1 Access Course" named "Client
Reference", and there is a control on the form whose ControlSource
property is "Client Reference".


That looks fine. Is the control named "Client Reference" the one whose
ControlSource is "Client Reference"?

Is there any code or macro being executed in the Open or Load events of the
form? If so, could you please post the details?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #18  
Old December 9th, 2008, 03:03 PM posted to microsoft.public.access
DAVID HARRIS
external usenet poster
 
Posts: 17
Default The OpenForm action was cancelled since upgrade from 2003 to 2

Dirk

The Contrl Name and Control Source is "Client Reference".
When working the Client Reference number of the client (the current client
screen when the button is pressed) is shown on the top of the form.

Would the Macro's be listed under "On Got Focus" on the events tab (Property
Sheet of the command button)?

David

"Dirk Goldgar" wrote:

"David Harris" wrote in message
...
I opened up form "Fm1/9 C1 Access Course" in design view, right clicked in
the top left hand corner and selected properties.
The Record Source is Tb1 Personal Details.

The fields for that table are shown below.

There is a control on the form "Fm1/9 C1 Access Course" named "Client
Reference", and there is a control on the form whose ControlSource
property is "Client Reference".


That looks fine. Is the control named "Client Reference" the one whose
ControlSource is "Client Reference"?

Is there any code or macro being executed in the Open or Load events of the
form? If so, could you please post the details?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #19  
Old December 9th, 2008, 05:43 PM posted to microsoft.public.access
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default The OpenForm action was cancelled since upgrade from 2003 to 2

"David Harris" wrote in message
...
Dirk

The Contrl Name and Control Source is "Client Reference".


That's what I expected; I just wanted to make sure.

When working the Client Reference number of the client (the current client
screen when the button is pressed) is shown on the top of the form.


You mean, in the "Client Reference" text box? Or in the form's caption?

Would the Macro's be listed under "On Got Focus" on the events tab
(Property
Sheet of the command button)?


Which command button, the one that opens the form? I'm not particularly
concerned about that. I'm interested in any code or macro that is executed
in the Open or Load event of the form, "Fm1/9 C1 Access Course". To
discover these, open that form in design view and bring up the property
sheet of the *form* -- the property sheet, when opened, should say "Form" at
the top. Then, on the Event tab, look for anything on the On Open, On Load,
or On Activate lines. Is there anything there? If it says "[Event
Procedure]", I'm going to want to see the VBA code for the event procedure.
If it gives the name of a macro, I'm going to want to know the details of
the macro. Since you say this is a database converted from A2003, I don't
expect that you'll have any event properties saying "[Embedded Macro]".

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #20  
Old December 10th, 2008, 11:50 AM posted to microsoft.public.access
DAVID HARRIS
external usenet poster
 
Posts: 17
Default The OpenForm action was cancelled since upgrade from 2003 to 2

I checked the "On Open", "On Load" or "On Activate" lines.
There is nothing on the "On Load" or "On Activate" lines.

On the "On Open" line there is a Macro called Mcr Open1/9CheckHrs.
When checking this it has 10 actions in the Macro.

Run Macro - Mcr Check Access Hrs1
Run Macro - Mcr Check Access Hrs2
Run Macro - Mcr Check Access Hrs3
Run Macro - Mcr Check Access Hrs4
Run Macro - Mcr Check Access Hrs5
Run Macro - Mcr Check Access Hrs6
Run Macro - Mcr Check Access Hrs7
Run Macro - Mcr Check Access Hrs8
Run Macro - Mcr Check Access Hrs9
Run Macro - Mcr Check Access Hrs10

Mcr Check Access Hrs1 (Contents below - All other macros are the smae except
1 Hours changes to 2 and so on depending on the Mcr name)

[Forms]![Fm1/9 C1 Access Course]![Fm1/9 C1 Access
CourseSubform].[Form]![C1Day 1 Hours][Forms]![Fm1/9 C1 Access Course]![Fm1/9
C1 Access CourseSubform].[Form]![Fm1/92 All Access Hrs Check
subfm].[Form]![Day 1 Hours]
Action = MsgBox
....
Action = SetValue
....
Action = SetValue
[Forms]![Fm1/9 C1 Access Course]![Fm1/9 C1 Access
CourseSubform].[Form]![C1Day 1 Hours]=0
Action = SetValue
....
Action = StopMacro
[Forms]![Fm1/9 C1 Access Course]![Fm1/9 C1 Access
CourseSubform].[Form]![C1Day 1 Hours]=[Forms]![Fm1/9 C1 Access Course]![Fm1/9
C1 Access CourseSubform].[Form]![Fm1/92 All Access Hrs Check
subfm].[Form]![Day 1 Hours]
Action = SetValue
[Forms]![Fm1/9 C1 Access Course]![Fm1/9 C1 Access
CourseSubform].[Form]![C1Day 1 Hours][Forms]![Fm1/9 C1 Access Course]![Fm1/9
C1 Access CourseSubform].[Form]![Fm1/92 All Access Hrs Check
subfm].[Form]![Day 1 Hours]
Action = SetValue

Regards,

David


"Dirk Goldgar" wrote:

"David Harris" wrote in message
...
Dirk

The Contrl Name and Control Source is "Client Reference".


That's what I expected; I just wanted to make sure.

When working the Client Reference number of the client (the current client
screen when the button is pressed) is shown on the top of the form.


You mean, in the "Client Reference" text box? Or in the form's caption?

Would the Macro's be listed under "On Got Focus" on the events tab
(Property
Sheet of the command button)?


Which command button, the one that opens the form? I'm not particularly
concerned about that. I'm interested in any code or macro that is executed
in the Open or Load event of the form, "Fm1/9 C1 Access Course". To
discover these, open that form in design view and bring up the property
sheet of the *form* -- the property sheet, when opened, should say "Form" at
the top. Then, on the Event tab, look for anything on the On Open, On Load,
or On Activate lines. Is there anything there? If it says "[Event
Procedure]", I'm going to want to see the VBA code for the event procedure.
If it gives the name of a macro, I'm going to want to know the details of
the macro. Since you say this is a database converted from A2003, I don't
expect that you'll have any event properties saying "[Embedded Macro]".

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.