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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

setvalue



 
 
Thread Tools Display Modes
  #1  
Old February 26th, 2005, 04:37 PM
Dagster
external usenet poster
 
Posts: n/a
Default setvalue

I have an old database with a form to set report criteria. It works fine in
Access 2002 and 97. I have recently upgraded to Access 2003 and the macro is
failing on the "SetValue" Action. The Active Arguments in 97 and 2002 were
Item: [Visible]
Expression: No

When I run in 2003, I get an error which halts the macro and the form is not
closed as it does in 2002. I have modified the Item to [Forms]![Report
Criteria].[Visible] though I then get an error indicating I cannot access the
ActiveX Control?? Any helpers?
  #2  
Old February 26th, 2005, 05:32 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

This is a bug in ACCESS 2003. See this Microsoft Knowledge Base article for
more information and how to work around it:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default...b;en-us;841916


--

Ken Snell
MS ACCESS MVP

"Dagster" wrote in message
news
I have an old database with a form to set report criteria. It works fine
in
Access 2002 and 97. I have recently upgraded to Access 2003 and the macro
is
failing on the "SetValue" Action. The Active Arguments in 97 and 2002
were
Item: [Visible]
Expression: No

When I run in 2003, I get an error which halts the macro and the form is
not
closed as it does in 2002. I have modified the Item to [Forms]![Report
Criteria].[Visible] though I then get an error indicating I cannot access
the
ActiveX Control?? Any helpers?



  #3  
Old February 27th, 2005, 12:29 PM
Dagster
external usenet poster
 
Posts: n/a
Default

Thanks Ken, You have led me straight to the bug. I have followed the work
around to the letter of Article ID : 841916 and created a vb module:

Public Function SetVisible(frmTarget As Object, fValue As Boolean)
frmTarget.Visible = fValue
End Function

Have then created a macro to call with a RunCode Action and an Argument of:
SetVisible (Forms!Report Criteria, False)
again as per Article ID : 841916. When I run the macro, it produces an error
"The Expression You Entered Contains Invalid Syntax"

The SetVisible function is detectable in the Argument Expression Builder, so
I am now quite confused. Any ideas?

I basically want to close my "Report Criteria" Form and continue with my
report generation.
cheers
Dagster

"Ken Snell [MVP]" wrote:

This is a bug in ACCESS 2003. See this Microsoft Knowledge Base article for
more information and how to work around it:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default...b;en-us;841916


--

Ken Snell
MS ACCESS MVP

"Dagster" wrote in message
news
I have an old database with a form to set report criteria. It works fine
in
Access 2002 and 97. I have recently upgraded to Access 2003 and the macro
is
failing on the "SetValue" Action. The Active Arguments in 97 and 2002
were
Item: [Visible]
Expression: No

When I run in 2003, I get an error which halts the macro and the form is
not
closed as it does in 2002. I have modified the Item to [Forms]![Report
Criteria].[Visible] though I then get an error indicating I cannot access
the
ActiveX Control?? Any helpers?




  #4  
Old February 27th, 2005, 07:26 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

You need [ ] around the name of the form because it contains spaces:

SetVisible (Forms![Report Criteria], False)


--

Ken Snell
MS ACCESS MVP

"Dagster" wrote in message
news
Thanks Ken, You have led me straight to the bug. I have followed the
work
around to the letter of Article ID : 841916 and created a vb module:

Public Function SetVisible(frmTarget As Object, fValue As Boolean)
frmTarget.Visible = fValue
End Function

Have then created a macro to call with a RunCode Action and an Argument
of:
SetVisible (Forms!Report Criteria, False)
again as per Article ID : 841916. When I run the macro, it produces an
error
"The Expression You Entered Contains Invalid Syntax"

The SetVisible function is detectable in the Argument Expression Builder,
so
I am now quite confused. Any ideas?

I basically want to close my "Report Criteria" Form and continue with my
report generation.
cheers
Dagster

"Ken Snell [MVP]" wrote:

This is a bug in ACCESS 2003. See this Microsoft Knowledge Base article
for
more information and how to work around it:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the
SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default...b;en-us;841916


--

Ken Snell
MS ACCESS MVP

"Dagster" wrote in message
news
I have an old database with a form to set report criteria. It works
fine
in
Access 2002 and 97. I have recently upgraded to Access 2003 and the
macro
is
failing on the "SetValue" Action. The Active Arguments in 97 and 2002
were
Item: [Visible]
Expression: No

When I run in 2003, I get an error which halts the macro and the form
is
not
closed as it does in 2002. I have modified the Item to [Forms]![Report
Criteria].[Visible] though I then get an error indicating I cannot
access
the
ActiveX Control?? Any helpers?






 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
SETVALUE IN SUBFORM Andre726 General Discussion 3 December 27th, 2008 03:54 PM
Using setvalue to insert text into a memo field Nick DeaneUK Using Forms 4 December 11th, 2004 09:17 PM
SetValue and Query art Using Forms 0 November 23rd, 2004 02:14 PM
trouble with setvalue in form Pei Using Forms 5 July 9th, 2004 12:59 AM


All times are GMT +1. The time now is 03:03 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.