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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |