Link to home
Start Free TrialLog in
Avatar of khawkins96
khawkins96

asked on

Access 2003+"You entered an expression that has an invalid reference to the property visible"

Access 2000 db converted to Access 2003. Now the macro used to give the user a dialog box to select a report criteria will not work. When a selection is made and OK is clicked, it says "You entered an expression that has an invalid reference to the property visible."

I tried the suggestion in MS Knowledge Base article #841916, but that didin't work.

Any other suggestions?

Thanks!
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

can you show the relevant part of the code, please?
Hi khawkins96,
841916 should solve the problem.

Can you post the function that you created and also list the Action arguments for your macro that calls this function.


Pete
Avatar of khawkins96
khawkins96

ASKER

Here's the Action arugments:

Actions
      Name                 Condition      Action      Argument      Value
      Open Dialog                               Open Form
                
                           Form Name:       frmMarchingRosterDialog  
                 View:       Form
                 Filter Name:
                 Where Condition:
                 Data Mode:       Edit
                 Window Mode:       Dialog


      Not IsLoaded ("fromMarchingRosterDialog")       CancelEvent    

               Close Dialog                                Close

                            Object Type:       Form
                  Object Name:       frmMarchingRosterDialog
                  Save:       No

               OK                                              SetValue

                            Item:       [Visible]      
                            Expression:       No

              Cancel                                           Close

                            Object Type:       Form      
                            Object Name:       frmMarchingRosterDialog
                  Save:       No


Here's what I have in the query:

[Forms]![frmMarchingRosterDialog]![MarchingBandDesc]

Thanks for your help!

            
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your help Pete!. In my macro, I used RunCode instead of SetValue and used the following argument: SetVisible(Forms! frmMarchingRosterDialog,False)